diff -r 000000000000 -r 60bc07f3f415 init.d/osecfs_downloads --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/init.d/osecfs_downloads Thu Feb 27 17:12:59 2014 +0100 @@ -0,0 +1,50 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: osecfsmount +# Required-Start: $all +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Mounts /home/osecuser/Downloads to /var/run/Downloads with osecfs +# Description: Mounts /home/osecuser/Downloads to /var/run/Downloads with osecfs +### END INIT INFO + +do_start () { + # + # If login delaying is enabled then remove the flag file + # + mkdir -p /var/run/Downloads + /usr/bin/osecfs /etc/osecfs/osecfs_downloads.cfg /var/run/Downloads ro +} + +do_status () { + /bin/df -hT +} + +do_stop () { + /bin/umount /var/run/Downloads + rmdir /var/run/Downloads +} + +case "$1" in + start) + do_start + ;; + restart|reload|force-reload) + echo "Error: argument '$1' not supported" >&2 + exit 3 + ;; + stop) + do_stop + ;; + status) + do_status + exit $? + ;; + *) + echo "Usage: $0 start|stop" >&2 + exit 3 + ;; +esac + +: