/* Misc FreeBSD tips
*
* $Header: /home/cvs/simon/homepage/freebsd-tips.php,v 1.19 2004/08/28 20:42:53 simon Exp $
*/
include("functions.inc.php");
$hhf = new HTML_Header_Footer();
$hhf->cvs_id = '$Id: freebsd-tips.php,v 1.19 2004/08/28 20:42:53 simon Exp $';
$hhf->title = "FreeBSD tips";
$hhf->print_header();
?>
This page contains misc. FreeBSD tips that might be useful.. they
are for me :)
It is still very much work in progress...
Use these tips at your own responsibility.
FreshPorts a nice site to stay up to date with your ports :)
# Start by downloading from a Danish mirror
MASTER_SITE_BACKUP?= \
ftp://ftp.dk.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/
# Make FreeBSD start getting distfiles (source for ports) from local
# freebsd mirror
MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
# Try Danish mirrors first, then Swedish and finally Norwegian.
MASTER_SORT_REGEX?= ^file: ^ftp://ftp\.FreeBSD\.org/pub/FreeBSD/ports/local-distfiles/ ://[^/]*\.dk/ ://[^/]*\.se ://[^/]*\.no\.
# Make it possible to update source and ports by just running make update
# in /usr/src and /usr/ports
SUP_UPDATE= yes
SUP= /usr/local/bin/cvsup
SUPFLAGS= -g -L 2
SUPHOST= cvsup.dk.freebsd.org # Change to your local cvsup mirror
SUPFILE= /usr/share/examples/cvsup/standard-supfile
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile
cvsup -L 2 -g -h cvsup.dk.freebsd.org /usr/share/examples/cvsup/ports-supfileNote: If you don not have cvsup installed, it can be installed with :
pkg_add -r cvsup-without-gui
It can be done in (at least) two ways :
Note: You might need to login again / restart X to make the change active.
me:\
:charset=iso-8859-1:\
:lang=da_DK.ISO8859-1:
danish:Danish Users Accounts:\
:charset=ISO-8859-1:\
:lang=da_DK.ISO8859-1:\
:tc=default:
Run
cap_mkdb /etc/login.conf pw usermod <your username> -L danish
setenv LC_MESSAGES en_US.ISO8859-1or if you use bash add the following to your ~/.bashrc :
LC_MESSAGES=en_US.ISO8859-1; export LC_MESSAGESNote: For some older versions of FreeBSD it might be needed to use da_DK.ISO_8859-1 instead of da_DK.ISO8859-1.
simon ALL=NOPASSWD:/sbin/mount /mnt/cdrom,/sbin/umount /mnt/cdrom simon ALL=NOPASSWD:/usr/sbin/cdcontrol -f /dev/acd0c ejectThis can be used with the following lines in your ~/.tcshrc file to make it really easy :
alias mntcd 'sudo mount /mnt/cdrom' alias umntcd 'sudo umount /mnt/cdrom' alias ejectcd 'sudo cdcontrol -f /dev/acd0c eject'
grep -E 'BRANCH|REVISION' /usr/src/sys/conf/newvers.sh
cat /tmp/1 | awk 'BEGIN{c=0} {c+=$2; print $2} END{print "Sum = ", c, "B", c/1024/1024/1024, "GB"}'
paging
set height 0
set print elements 0Main homepage