# mountall - Mount filesystems on boot
#
# This helper mounts filesystems in the correct order as the devices
# and mountpoints become available.

description	"Mount filesystems on boot"

start on startup
stop on rcS

expect daemon
task

emits virtual-filesystems
emits local-filesystems
emits remote-filesystems
emits all-swaps
emits all-filesystems
emits filesystem

# temporary, until we have progress indication
# and output capture (next week :p)
console output

script
    . /etc/default/rcS
    [ -f /forcefsck ] && force_fsck="--force-fsck"
    [ "$FSCKFIX" = "yes" ] && fsck_fix="--fsck-fix"
    [ -n "$TMPTIME" ] && tmptime="--tmptime=$TMPTIME"
    exec mountall --daemon $force_fsck $fsck_fix $tmptime
end script

post-stop script
    rm -f /forcefsck 2>dev/null || true
end script
