aboutsummaryrefslogtreecommitdiffstats
path: root/lsb-bootscripts/etc/default/rc
diff options
context:
space:
mode:
Diffstat (limited to 'lsb-bootscripts/etc/default/rc')
-rw-r--r--lsb-bootscripts/etc/default/rc44
1 files changed, 44 insertions, 0 deletions
diff --git a/lsb-bootscripts/etc/default/rc b/lsb-bootscripts/etc/default/rc
new file mode 100644
index 000000000..96bd476d9
--- /dev/null
+++ b/lsb-bootscripts/etc/default/rc
@@ -0,0 +1,44 @@
+# Begin /etc/default/rc
+
+# Author: DJ Lucas - dj@linuxfromscratch.org
+# Version: 1.0 LSB V.3.1
+
+# Global variable inherited by initscripts are in caps
+# Local variables for the rc script are in lowercase
+
+# Source site specific rc configuration
+. /etc/default/rc.site
+
+# This sets default terminal options.
+# stty sane - this has been removed as nobody recalls
+# the reason for it in the first place - if no problems arize,
+# then it will be removed completely at a later date.
+
+# Setup default values for the environment
+umask 022
+PATH="/bin:/sbin"
+
+# Find current screen size
+if [ -z "${COLUMNS}" ]; then
+ COLUMNS=$(stty size)
+ COLUMNS=${COLUMNS##* }
+fi
+
+# When using remote connections, such as a serial port, stty size returns 0
+if [ "${COLUMNS}" = "0" ]; then
+ COLUMNS=80
+fi
+
+## Measurements for positioning result messages
+COL=$((${COLUMNS} - 8))
+WCOL=$((${COL} - 2))
+
+# Set Cursur Position Commands, used via echo -e
+SET_COL="\\033[${COL}G" # at the $COL char
+SET_WCOL="\\033[${WCOL}G" # at the $WCOL char
+CURS_UP="\\033[1A\\033[0G" # Up one line, at the 0'th char
+
+# Export the environment variables so they are inherited by the scripts
+export PATH SET_COL SET_WCOL CURS_UP BOOTLOG_ENAB
+
+# End /etc/default/rc