LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #22  
Old 19-Oct-2009, 05:37 AM
Senior Member
 
Join Date: Feb 2008
Location: England, UK
Posts: 242
mikewillis 1-9 reputation points
Default Re: SLED11, crontab command

I think I might have found the solution. At least I appear to have solved the problem for my user who reported it. I'm wary that it might yet re-occur though.

I added some commands to /etc/init.d/halt.local that make sure that all NFS mounts are un-mounted. E.g. this makes sure that all home directories are unmounted (in theory anyway).

Code:
cd /home
if [ -n "$(ls)" ];then
   for i in *;do
   # kill processes belonging to that user
   skill  $i;
   # umount this home directory
   umount $i;
   done
fi
cd -
This is for where home directories are mounted independently of each other using autofs. If you mount home directories with the all-or-nothing approach using a line in /etc/fstab then the code needs to be different. I think this:

Code:
cd /home
if [ -n "$(ls)" ];then
   for i in *;do
   skill  $i;
   done
fi
cd -
umount /home
If you have a lot of home directories in /home then that script could take a while though!
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -6. The time now is 03:15 AM.


© 2007 Novell, Inc. All Rights Reserved.

Search Engine Friendly URLs by vBSEO 3.3.0 RC2