aboutsummaryrefslogtreecommitdiffstats
path: root/chapter9
diff options
context:
space:
mode:
Diffstat (limited to 'chapter9')
-rw-r--r--chapter9/bashprofile.sh9
-rw-r--r--chapter9/bootscriptconf.sh51
-rw-r--r--chapter9/inputrc.sh45
-rw-r--r--chapter9/shells.sh10
4 files changed, 115 insertions, 0 deletions
diff --git a/chapter9/bashprofile.sh b/chapter9/bashprofile.sh
new file mode 100644
index 0000000..9636b3a
--- /dev/null
+++ b/chapter9/bashprofile.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+cat > /etc/profile << "EOF"
+# Begin /etc/profile
+
+export LANG=en_US
+
+# End /etc/profile
+EOF
diff --git a/chapter9/bootscriptconf.sh b/chapter9/bootscriptconf.sh
new file mode 100644
index 0000000..3c00024
--- /dev/null
+++ b/chapter9/bootscriptconf.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+cat > /etc/inittab << "EOF"
+# Begin /etc/inittab
+
+id:3:initdefault:
+
+si::sysinit:/etc/rc.d/init.d/rc S
+
+l0:0:wait:/etc/rc.d/init.d/rc 0
+l1:S1:wait:/etc/rc.d/init.d/rc 1
+l2:2:wait:/etc/rc.d/init.d/rc 2
+l3:3:wait:/etc/rc.d/init.d/rc 3
+l4:4:wait:/etc/rc.d/init.d/rc 4
+l5:5:wait:/etc/rc.d/init.d/rc 5
+l6:6:wait:/etc/rc.d/init.d/rc 6
+
+ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
+
+su:S016:once:/sbin/sulogin
+
+1:2345:respawn:/sbin/agetty --noclear tty1 9600
+2:2345:respawn:/sbin/agetty tty2 9600
+3:2345:respawn:/sbin/agetty tty3 9600
+4:2345:respawn:/sbin/agetty tty4 9600
+5:2345:respawn:/sbin/agetty tty5 9600
+6:2345:respawn:/sbin/agetty tty6 9600
+
+# End /etc/inittab
+EOF
+
+cat > /etc/sysconfig/clock << "EOF"
+# Begin /etc/sysconfig/clock
+
+UTC=1
+
+# Set this to any options you might need to give to hwclock,
+# such as machine hardware clock type for Alphas.
+CLOCKPARAMS=
+
+# End /etc/sysconfig/clock
+EOF
+
+#cat > /etc/sysconfig/console << "EOF"
+# Begin /etc/sysconfig/console
+
+#KEYMAP="pl2"
+#FONT="lat2a-16 -m 8859-2"
+
+# End /etc/sysconfig/console
+#EOF
diff --git a/chapter9/inputrc.sh b/chapter9/inputrc.sh
new file mode 100644
index 0000000..bab2a35
--- /dev/null
+++ b/chapter9/inputrc.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+cat > /etc/inputrc << "EOF"
+# Begin /etc/inputrc
+# Modified by Chris Lynn <roryo@roryo.dynup.net>
+
+# Allow the command prompt to wrap to the next line
+set horizontal-scroll-mode Off
+
+# Enable 8bit input
+set meta-flag On
+set input-meta On
+
+# Turns off 8th bit stripping
+set convert-meta Off
+
+# Keep the 8th bit for display
+set output-meta On
+
+# none, visible or audible
+set bell-style none
+
+# All of the following map the escape sequence of the value
+# contained in the 1st argument to the readline specific functions
+"\eOd": backward-word
+"\eOc": forward-word
+
+# for linux console
+"\e[1~": beginning-of-line
+"\e[4~": end-of-line
+"\e[5~": beginning-of-history
+"\e[6~": end-of-history
+"\e[3~": delete-char
+"\e[2~": quoted-insert
+
+# for xterm
+"\eOH": beginning-of-line
+"\eOF": end-of-line
+
+# for Konsole
+"\e[H": beginning-of-line
+"\e[F": end-of-line
+
+# End /etc/inputrc
+EOF
diff --git a/chapter9/shells.sh b/chapter9/shells.sh
new file mode 100644
index 0000000..d94254c
--- /dev/null
+++ b/chapter9/shells.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+cat > /etc/shells << "EOF"
+# Begin /etc/shells
+
+/bin/sh
+/bin/bash
+
+# End /etc/shells
+EOF