#!/bin/rc # label word ... - write words into our label, if any # extra: -f to fix the label by binding /dev/null over it, # and -u to unbind. rfork e force = () if(~ $1 -f) { force = yes shift } if(~ $1 -u) { unmount /dev/label exit } if (test -w /dev/label) label = /dev/label if not if (test -w /mnt/term/dev/label) label = /mnt/term/dev/label if not exit 'no label file' if(! ~ $#* 0) { # allow -f to fix existing label echo -n $* > $label } # small bug: doesn't complain if given no arguments at all. if(~ $"force yes) bind /dev/null /dev/label