summaryrefslogtreecommitdiff
path: root/etc.BSD
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-05-02 10:43:43 +0000
committerRoy Marples <roy@marples.name>2007-05-02 10:43:43 +0000
commit700bdb4f1dce01eeacaf07937a6386563dd84ddb (patch)
tree3e61946615dd1ea065c093aded82a077f2a8c74e /etc.BSD
parentb2d024b7f46883ed4c7c85a6d0912079c8b7ffb8 (diff)
downloadopenrc-700bdb4f1dce01eeacaf07937a6386563dd84ddb.tar.gz
openrc-700bdb4f1dce01eeacaf07937a6386563dd84ddb.tar.bz2
openrc-700bdb4f1dce01eeacaf07937a6386563dd84ddb.tar.xz
Stop blindly assuming that a blank TERM is cons25. For cons25 terms we drop one column so we don't get an extra newline.
Diffstat (limited to 'etc.BSD')
-rw-r--r--etc.BSD/rc5
-rw-r--r--etc.BSD/rc.shutdown9
2 files changed, 10 insertions, 4 deletions
diff --git a/etc.BSD/rc b/etc.BSD/rc
index 13a192a..f9f76b8 100644
--- a/etc.BSD/rc
+++ b/etc.BSD/rc
@@ -5,10 +5,13 @@
# Ensure we are called by init
[ "$PPID" = "1" ] || exit 0
+# If $TERM is not set then assume default of cons25
+# This gives us a nice colour boot :)
+[ -z "$TERM" ] && export TERM="cons25"
+
# BSD's init works somewhat differently to sysvinit.
# This block should 'translate' from the way init calls it to the way it would
# be called by sysvinit on linux.
-
RUNLEVEL="1" /sbin/rc sysinit || exit 1
RUNLEVEL="1" /sbin/rc boot || exit 1
PREVLEVEL="1" /sbin/rc default
diff --git a/etc.BSD/rc.shutdown b/etc.BSD/rc.shutdown
index 0fe2283..81dc20f 100644
--- a/etc.BSD/rc.shutdown
+++ b/etc.BSD/rc.shutdown
@@ -7,8 +7,11 @@
# Try and use stuff in /lib over anywhere else so we can shutdown
# local mounts correctly.
-LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}"
-export LD_LIBRARY_PATH
+export LD_LIBRARY_PATH="/lib${LD_LIBRARY_PATH:+:}${LDLIBRARY_PATH}"
+
+# If $TERM is not set then assume default of cons25
+# This gives us a nice colour shutdown :)
+[ -z "$TERM" ] && export TERM="cons25"
# BSD's init works somewhat differently to sysvinit.
# This block should 'translate' from the way init calls it to the way it would
@@ -16,6 +19,6 @@ export LD_LIBRARY_PATH
case "$1" in
reboot) export RUNLEVEL=6;;
shutdown) export RUNLEVEL=0;;
- single) export RUNLEVEL=S;;
+ single) export RUNLEVEL=S;;
esac
exec /sbin/rc "$1"