develop
asamoukin 15 years ago
parent df62f2a586
commit d075fff14f

@ -0,0 +1,36 @@
#!/sbin/runscript
depend() {
use localmount
after bootmisc consolefont modules netmount
after readahead-list ypbind autofs openvpn gpm lircmd
after cupsd fbcondecor sshd cron
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"
umount /var/calculate/remote
}
# vim:ts=4

@ -0,0 +1,11 @@
#! /bin/sh
if [ -e '/var/log/cl_login-error.log' ];
then
ERROR=`cat /var/log/cl_login-error.log`
if [ $ERROR ];
then
exit 1
fi
fi
exit 0

@ -0,0 +1,43 @@
#! /bin/sh
env-update
source /etc/profile
# Очистим лог ошибок
echo "" > /var/log/cl_login-error.log
if [ -e '/usr/bin/cl-sync' ];
then
ERRORLOG=`/usr/bin/cl-sync --progress --color=never --login $USER`
# при неудачном выполнении, сгенерируем ошибку
if [ "$?" -gt "0" ];
then
echo $ERRORLOG > /var/log/cl_login-error.log
xmessage -buttons OK:0 -default OK "cl-sync:
$ERRORLOG"
exit 1
fi
fi
if [ -e '/usr/bin/cl-createhome' ];
then
ERRORLOG=`/usr/bin/cl-createhome --progress --color=never $USER`
# при неудачном выполнении, сгенерируем ошибку
if [ "$?" -gt "0" ];
then
echo $ERRORLOG >> /var/log/cl_login-error.log
ERRORLOG2=`/usr/bin/cl-sync --color=never --logout --nosync $USER`
if [ "$?" -gt "0" ];
then
xmessage -buttons OK:0 -default OK "cl-sync:
$ERRORLOG2"
fi
xmessage -buttons OK:0 -default OK "cl-createhome:
$ERRORLOG"
exit 1
fi
fi
#очистим кэш
/bin/rm -rf /var/tmp/kdecache-$USER
exit 0

@ -0,0 +1,14 @@
#! /bin/sh
if [ -e '/usr/bin/cl-sync' ];
then
/usr/bin/cl-sync --logout $USER
# при неудачном выполнении, сгенерируем ошибку
if [ "$?" -gt "0" ];
then
echo 'ERROR'
exit 1
fi
fi
exit 0
Loading…
Cancel
Save