So, if you want filesystems mounted from DCSS automagically, you gotta do a little setup.
This is for Debian but ought to be easily portable. You're looking to modify the initial filesystem mounting in /etc/init.d. Basically, you need to make sure that dcssblk and your shared segments are ready to go *before* you walk through fstab looking for mountpoints. In Debian, I modified /etc/init.d/mountall.sh. The diff is at the end of the message. What it does is to first mount /proc (because DCSS requires /proc). Devfs too, but at least Debian already has /dev mounted by then. Since DCSS will run without devfs, you probably don't need it, but then you'd need to automate mount point creation. Then it reads in the new file /etc/dcss. Here's mine: ***********/etc/dcss********** # Just list the segments you want to load in here USR ***********/etc/dcss********** Then it loops over /etc/dcss, throwing away comments (I stole that case statement from mountnfs.sh--I don't quite understand how it works, but it does), and adding anything else it finds to the loaded segment list. Then it proceeds as normal. The line in /etc/fstab just reads: /dev/dcssblk/USR /usr ext2 ro 0 0 ***************DIFF FOR DCSS MOUNTS******************** dcss2:~# diff -u mountall.sh.orig /etc/init.d/mountall.sh --- mountall.sh.orig Tue Feb 17 15:41:35 2004 +++ /etc/init.d/mountall.sh Tue Feb 17 15:32:26 2004 @@ -11,8 +11,29 @@ # about this. So we mount "proc" filesystems without -v. # [ "$VERBOSE" != no ] && echo "Mounting local filesystems..." -mount -avt nonfs,nosmbfs,noncpfs,noproc + +# Mount proc and devfs first because dcssblk depends on them... mount -at proc +mount -at devfs + +test -f /etc/dcss && ( + + /sbin/modprobe -k dcssblk + + while read segment + do + case "$segment" in + ""|\#*) + continue + ;; + esac + + + echo $segment > /proc/dcssblk/add + done +) < /etc/dcss + +mount -avt nonfs,nosmbfs,noncpfs,noproc,nodevfs # # We might have mounted something over /dev, see if /dev/initctl is there. ***************DIFF FOR DCSS MOUNTS******************** An obvious improvement would be to add the device numbers to /etc/dcss if you don't have devfs enabled. Adam
