Added usher file which will create /etc/inittab if it doesn't exist
This commit is contained in:
2
Makefile
2
Makefile
@@ -13,7 +13,7 @@ ARCH = x86_64
|
||||
URL = https://savannah.nongnu.org/projects/sysvinit
|
||||
DESC = System V style init programs original written by Miquel van Smoorenburg \
|
||||
that control the booting and shutdown of your system
|
||||
SNAPVER = sr1
|
||||
SNAPVER = sr2
|
||||
|
||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||
|
||||
38
SNAP/usher
Executable file
38
SNAP/usher
Executable file
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
INITTAB="id:3:initdefault:
|
||||
si::sysinit:/etc/init.d/rc S
|
||||
l0:0:wait:/etc/init.d/rc 0
|
||||
l1:S1:wait:/etc/init.d/rc 1
|
||||
l2:2:wait:/etc/init.d/rc 2
|
||||
l3:3:wait:/etc/init.d/rc 3
|
||||
l4:4:wait:/etc/init.d/rc 4
|
||||
l5:5:wait:/etc/init.d/rc 5
|
||||
l6:6:wait:/etc/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 38400
|
||||
2:2345:respawn:/sbin/agetty tty2 38400
|
||||
3:2345:respawn:/sbin/agetty tty3 38400
|
||||
4:2345:respawn:/sbin/agetty tty4 38400
|
||||
5:2345:respawn:/sbin/agetty tty5 38400
|
||||
6:2345:respawn:/sbin/agetty tty6 38400"
|
||||
|
||||
case $1 in
|
||||
preinst)
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
if [ ! -f ${TARGET}/etc/inittab ]; then
|
||||
echo "${INITTAB}" > ${TARGET}/etc/inittab
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
exit 0
|
||||
;;
|
||||
postrm)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user