mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-21 19:52:52 +00:00
Add 9.6 - Configure sysvinit
This commit is contained in:
parent
6975454f25
commit
09bd417942
2 changed files with 56 additions and 0 deletions
44
scripts/chapter9/9.6-configure-sysvinit.sh
Normal file
44
scripts/chapter9/9.6-configure-sysvinit.sh
Normal file
|
@ -0,0 +1,44 @@
|
|||
#!/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:S06:once:/sbin/sulogin
|
||||
s1:1:respawn:/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
|
||||
|
|
@ -1499,3 +1499,15 @@ then
|
|||
stop_script "chapter9/9.2-lfs-bootscripts.sh"
|
||||
fi
|
||||
|
||||
# Chapter 9.6
|
||||
# ===========
|
||||
echo "Configuring sysvinit"
|
||||
su -c "bash $SCRIPT/chapter9/9.6-configure-sysvinit.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "chapter9/9.6-configure-sysvinit.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue