summaryrefslogtreecommitdiffstats
path: root/source/installer/sources/initrd/etc/profile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/installer/sources/initrd/etc/profile35
-rwxr-xr-xsource/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh55
-rwxr-xr-xsource/installer/sources/initrd/etc/profile.d/glibc.sh8
3 files changed, 98 insertions, 0 deletions
diff --git a/source/installer/sources/initrd/etc/profile b/source/installer/sources/initrd/etc/profile
new file mode 100644
index 000000000..c728b165b
--- /dev/null
+++ b/source/installer/sources/initrd/etc/profile
@@ -0,0 +1,35 @@
+# commands common to all logins
+PATH="$PATH:/bin:/sbin:/usr/bin:/usr/lib/setup"
+PATH="$PATH:/mnt/usr/local/bin:/mnt/usr/bin:/mnt/bin"
+PATH="$PATH:/mnt/usr/local/sbin:/mnt/usr/sbin:/mnt/sbin"
+PATH="$PATH:/mnt/linux/usr/local/bin:/mnt/linux/usr/bin:/mnt/linux/bin"
+PATH="$PATH:/mnt/linux/usr/local/sbin:/mnt/linux/usr/sbin:/mnt/linux/sbin"
+
+# Allow a user to set the default TERM entry by specifying TERM=<name>
+# as a kernel command line parameter:
+if cat /proc/cmdline | grep "TERM=[a-zA-Z0-9]" 1> /dev/null 2> /dev/null ; then
+ export TERM=$( sed 's/.*TERM=\([^ ]*\).*/\1/' < /proc/cmdline )
+elif cat /proc/cmdline | grep console=ttyS 1> /dev/null 2> /dev/null ; then
+ export TERM=vt100
+else
+ export TERM=linux
+fi
+HOME=/root
+LESS=-MM
+
+# Set command line prompt:
+PS1='\u@\h:\w# '
+PS2='> '
+
+ignoreeof=10
+export HOME PATH DISPLAY LESS TERM PS1 PS2 ignoreeof
+umask 022
+
+# Append any additional sh scripts found in /etc/profile.d/:
+for profile_script in /etc/profile.d/*.sh ; do
+ if [ -x $profile_script ]; then
+ . $profile_script
+ fi
+done
+unset profile_script
+
diff --git a/source/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh b/source/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh
new file mode 100755
index 000000000..57670d6ef
--- /dev/null
+++ b/source/installer/sources/initrd/etc/profile.d/coreutils-dircolors.sh
@@ -0,0 +1,55 @@
+# Slackware color ls profile script for /bin/sh-like shells.
+
+# Set up LS_OPTIONS environment variable.
+# This contains extra command line options to use with ls.
+# The default ones are:
+# -F = show '/' for dirs, '*' for executables, etc.
+# -T 0 = don't trust tab spacing when formatting ls output.
+# -b = better support for special characters
+OPTIONS="-F -b -T 0"
+
+# COLOR needs one of these arguments:
+# 'auto' colorizes output to ttys, but not pipes.
+# 'always' adds color characters to all output.
+# 'never' shuts colorization off.
+COLOR=auto
+
+# This section shouldn't require any user adjustment since it is
+# simply setting the LS_OPTIONS variable using the information
+# already given above:
+LS_OPTIONS=" $OPTIONS --color=$COLOR ";
+export LS_OPTIONS;
+unset COLOR
+unset OPTIONS
+
+# Set up aliases to use color ls by default. A few additional
+# aliases like 'dir', 'vdir', etc, are some ancient artifacts
+# from 1992 or so... possibly they should be disabled, but maybe
+# someone out there is actually using them? :-)
+# Assume shell aliases are supported. Ash is going to freak out
+# when it sees zsh syntax anyway, so whatever.
+alias ls='/bin/ls $LS_OPTIONS';
+alias dir='/bin/ls $LS_OPTIONS --format=vertical';
+alias vdir='/bin/ls $LS_OPTIONS --format=long';
+alias d=dir;
+alias v=vdir;
+
+# Just for fun, here are the old sh/ash style shell functions.
+# this script isn't currently working with ash (and makes some noisy
+# error messages), but perhaps these will still be of use to
+# someone...
+#ls () { /bin/ls $LS_OPTIONS "$@" ; };
+#dir () { /bin/ls $LS_OPTIONS --format=vertical "$@" ; };
+#vdir () { /bin/ls $LS_OPTIONS --format=long "$@" ; };
+#d () { dir "$@" ; };
+#v () { vdir "$@" ; };
+
+# Set up the LS_COLORS environment:
+if [ -f $HOME/.dir_colors ]; then
+ eval `/bin/dircolors -b $HOME/.dir_colors`
+elif [ -f /etc/DIR_COLORS ]; then
+ eval `/bin/dircolors -b /etc/DIR_COLORS`
+else
+ eval `/bin/dircolors -b`
+fi
+
diff --git a/source/installer/sources/initrd/etc/profile.d/glibc.sh b/source/installer/sources/initrd/etc/profile.d/glibc.sh
new file mode 100755
index 000000000..979f4879e
--- /dev/null
+++ b/source/installer/sources/initrd/etc/profile.d/glibc.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Set more relaxed (glibc-2.3.5 like) malloc() checking.
+#
+# This relaxes the default paranoia level so that it reports
+# bugs, but does not kill the questionable process. You can
+# get away with running broken programs with this setting,
+# but at a possible performance and security cost.
+#export MALLOC_CHECK_=1