home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / init.d / bootmisc.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2012-03-27  |  1.3 KB  |  66 lines

  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:          bootmisc
  4. # Required-Start:    $remote_fs
  5. # Required-Stop:
  6. # Should-Start:      udev
  7. # Default-Start:     S
  8. # Default-Stop:
  9. # Short-Description: Miscellaneous things to be done during bootup.
  10. # Description:       Some cleanup.  Note, it need to run after mountnfs-bootclean.sh.
  11. ### END INIT INFO
  12.  
  13. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  14. [ "$DELAYLOGIN" ] || DELAYLOGIN=yes
  15. . /lib/init/vars.sh
  16.  
  17. do_start () {
  18.     #
  19.     # If login delaying is enabled then create the flag file
  20.     # which prevents logins before startup is complete
  21.     #
  22.     case "$DELAYLOGIN" in
  23.       Y*|y*)
  24.         echo "System bootup in progress - please wait" > /var/lib/initscripts/nologin
  25.         ;;
  26.     esac
  27.  
  28.     # Create /var/run/utmp so we can login.
  29.     : > /var/run/utmp
  30.     if grep -q ^utmp: /etc/group
  31.     then
  32.         chmod 664 /var/run/utmp
  33.         chgrp utmp /var/run/utmp
  34.     fi
  35.  
  36.     # Set pseudo-terminal access permissions.
  37.     if [ ! -e /dev/.udev ] && [ -c /dev/ttyp0 ]
  38.     then
  39.         chmod -f 666 /dev/tty[p-za-e][0-9a-f]
  40.         chown -f root:tty /dev/tty[p-za-e][0-9a-f]
  41.     fi
  42.  
  43.     # Remove bootclean's flag files.
  44.     # Don't run bootclean again after this!
  45.     rm -f /tmp/.clean /var/run/.clean /var/lock/.clean
  46. }
  47.  
  48. case "$1" in
  49.   start|"")
  50.     do_start
  51.     ;;
  52.   restart|reload|force-reload)
  53.     echo "Error: argument '$1' not supported" >&2
  54.     exit 3
  55.     ;;
  56.   stop)
  57.     # No-op
  58.     ;;
  59.   *)
  60.     echo "Usage: bootmisc.sh [start|stop]" >&2
  61.     exit 3
  62.     ;;
  63. esac
  64.  
  65. :
  66.