You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-utils-2.1-client/data/client

39 lines
906 B

#!/sbin/runscript
depend() {
use localmount
after bootmisc consolefont modules netmount
after readahead-list ypbind autofs openvpn gpm lircmd
after cupsd fbcondecor sshd cron wicd
before xdm
after acpid consolekit hald xfs
}
start() {
# Mount remote Samba filesystems.
ebegin "Mounting domain resources"
# Identifing domen server by env file
local env_file=/var/calculate/calculate.env
if [[ -f $env_file ]]
then
local SERVER=$( sed -rn 's/^cl_remote_host\s*=\s*(\S+)$/\1/p' $env_file )
for COUNT in $( seq 0 1 )
do
ping -w2 -c1 $SERVER &>/dev/null && break || sleep 1
done
fi
cl-client --mount
eend $? "Some samba remote resources to mount"
}
stop(){
ebegin "Unmount domain resources"
[[ $( mount | grep ' /var/calculate/remote ' ) ]] &&
umount /var/calculate/remote
[[ $( mount | grep '/var/calculate/client-home on /home ' ) ]] &&
umount /home
eend 0
}
# vim:ts=4