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.
44 lines
900 B
44 lines
900 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
|
|
use acpid consolekit hald xfs
|
|
}
|
|
|
|
start() {
|
|
# Mount remote Samba filesystems.
|
|
ebegin "Mounting domain resources"
|
|
# Identifing domen server by env file
|
|
SERVER=`cat /var/calculate/calculate.env | grep cl_remote_host | awk '{print \$3}'`
|
|
let COUNT=20
|
|
while let "${COUNT} > 0";
|
|
do
|
|
if ping -w2 -c1 $SERVER &>/dev/null;
|
|
then
|
|
break;
|
|
else
|
|
sleep 1;
|
|
fi
|
|
let COUNT=COUNT-1
|
|
done
|
|
cl-client --mount
|
|
eend $? "Some samba remote resources to mount"
|
|
}
|
|
stop(){
|
|
ebegin "Unmount domain resources"
|
|
if [[ `mount | grep ' /var/calculate/remote '` ]];
|
|
then
|
|
umount /var/calculate/remote
|
|
fi
|
|
if [[ `mount | grep '/var/calculate/client-home on /home '` ]];
|
|
then
|
|
umount /home
|
|
fi
|
|
}
|
|
|
|
# vim:ts=4
|