Actions

Difference between revisions of "Ubuntu shutdown unmount CIFS"

From zen2

 
m (1 revision)
 
(No difference)

Latest revision as of 08:45, 25 July 2013

To unmount Samba shares before shutting down network services, run the following commands as root:

ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh

In Jaunty edit /etc/gdm/PostSession/Default and add /etc/init.d/umountnfs.sh to the top of the file like so:

#!/bin/sh
/etc/init.d/umountnfs.sh

PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH:/bin:/usr/bin"
OLD_IFS=$IFS

gdmwhich () {
  COMMAND="$1"
  OUTPUT=
  IFS=:
  for dir in $PATH
  do
    if test -x "$dir/$COMMAND" ; then
      if test "x$OUTPUT" = "x" ; then
        OUTPUT="$dir/$COMMAND"
      fi
    fi
  done
  IFS=$OLD_IFS
  echo "$OUTPUT"
}

exit 0