Displaying posts tagged: freebsd

Installing packages into your user directory

No Comments
Today I had the need to install some FreeBSD and Ubuntu packages inside my home directory because I did not have root permissions to install them. It was quite simple to install the packages on FreeBSD pkg_add -rRP /home/bramp nano Where nano is the name of the package I wanted. I should point out you don't ...

Updating.../-\|/-|

2 Comments
Do people other than me find updating their servers to be relaxing? At every opportunity I run "apt-get update". Today I'm updating 7 different machines simultaneously. My Debian machines I simply issue the following commands: apt-get update apt-get upgrade My FreeBSD machines: portsnap fetch update portmanager -u I think the Debian process is easier (and clearly ...

Useful scripts/configurations

No Comments
Make git colourful git config --global color.diff auto git config --global color.status auto git config --global color.branch auto Make nano colourful cp /usr/local/share/examples/nano/nanorc.sample ~/.nanorc or zcat /usr/share/doc/nano/examples/nanorc.sample.gz >~/.nanorc then nano ~/.nanorc To trim trailing whitespace from *.cc on Linux (taken from this blog): find . -name '*.cc' -exec sed -i {} -e 's/[ \t]*$//' ';' and ...

FreeBSD Software Watchdog

No Comments
Recently I've been doing some kernel hacking and I managed to deadlock my system. The system still responded to pings but the terminal was unresponsive, and it needed a hard reboot to fix. I would have loved to drop into a debugger or panic'ed the kernel to get a suitable back-trace. I found that FreeBSD has ...

memcmp broken in the FreeBSD kernel

No Comments
I've spent a day tracking down a bug in a FreeBSD kernel module I'm developing, and to my surprise the bug was due to memcmp being broken! For those that don't know, memcmp is used to compare two byte strings and returns 0 if they are identical, a negative number of the first string is less ...