/[baselayout]/trunk/etc.BSD/rc.shutdown
Gentoo

Contents of /trunk/etc.BSD/rc.shutdown

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2673 - (show annotations) (download)
Wed May 2 10:43:43 2007 UTC (7 years, 3 months ago) by uberlord
File size: 776 byte(s)
Stop blindly assuming that a blank TERM is cons25. For cons25 terms we drop one column so we don't get an extra newline.
1 #!/bin/sh
2 # Copyright 2006-2007 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 # Ensure we are called by init
6 [ "$PPID" = "1" ] || exit 0
7
8 # Try and use stuff in /lib over anywhere else so we can shutdown
9 # local mounts correctly.
10 export LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}"
11
12 # If $TERM is not set then assume default of cons25
13 # This gives us a nice colour shutdown :)
14 [ -z "$TERM" ] && export TERM="cons25"
15
16 # BSD's init works somewhat differently to sysvinit.
17 # This block should 'translate' from the way init calls it to the way it would
18 # be called by sysvinit on linux.
19 case "$1" in
20 reboot) export RUNLEVEL=6;;
21 shutdown) export RUNLEVEL=0;;
22 single) export RUNLEVEL=S;;
23 esac
24 exec /sbin/rc "$1"

  ViewVC Help
Powered by ViewVC 1.1.20