# HG changeset patch # User Christophe Lincoln # Date 1209293997 -7200 # Node ID 57f6cb87de5a7fade13014d2324d64c560c0cd1e # Parent 1e93fd1b1640598a7f3ec99a23f570a4a5848153 Option: mount (Mount all ext3 local partitions automaticaly diff -r 1e93fd1b1640 -r 57f6cb87de5a etc/init.d/bootopts.sh --- a/etc/init.d/bootopts.sh Mon Apr 21 10:17:44 2008 +0000 +++ b/etc/init.d/bootopts.sh Sun Apr 27 12:59:57 2008 +0200 @@ -49,6 +49,25 @@ fi } +# Mount all ext3 partitions found (opt: mount). +mount_partitions() +{ + # Get the list partitions. + DEVICES_LIST=`fdisk -l | grep 83 | cut -d " " -f 1` + + # Mount filesystems rw. + for device in $DEVICES_LIST + do + name=${device#/dev/} + # Device can be already used by home=usb. + if ! mount | grep ^$device >/dev/null; then + echo "Mounting partition: $name on /mnt/$name" + mkdir /mnt/$name + mount $device /mnt/$name + fi + done +} + # Parse /proc/cmdline with grep. # @@ -119,8 +138,13 @@ echo "enlightenment" > /etc/X11/wm.default ;; esac else - # If no default WM fallback to JWM. + # If no default WM fallback to Openbox. if [ ! -f /etc/X11/wm.default ]; then - echo "jwm" > /etc/X11/wm.default + echo "openbox" > /etc/X11/wm.default fi fi + +# Check for option mount. +if grep -q "mount" /proc/cmdline; then + mount_partitions +fi