Compare commits
4 Commits
v2.88dsf-4
...
v2.88dsf-9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69a8473bec | ||
|
|
f0c072202c | ||
|
|
7ec9cd6634 | ||
|
|
f187836707 |
7
Makefile
7
Makefile
@@ -11,10 +11,11 @@
|
|||||||
DEPENDS = glibc
|
DEPENDS = glibc
|
||||||
ARCH = x86_64
|
ARCH = x86_64
|
||||||
URL = https://savannah.nongnu.org/projects/sysvinit
|
URL = https://savannah.nongnu.org/projects/sysvinit
|
||||||
|
REPO = core
|
||||||
BRIEF = System that manages boot and shutdown
|
BRIEF = System that manages boot and shutdown
|
||||||
DESC = System V style init programs original written by Miquel van Smoorenburg \
|
DESC = System V style init programs original written by Miquel van Smoorenburg \
|
||||||
that control the booting and shutdown of your system
|
that control the booting and shutdown of your system
|
||||||
SNAPVER = 4
|
SNAPVER = 9
|
||||||
|
|
||||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||||
@@ -53,7 +54,9 @@ $(ROOT): $(SRCDIR)/src/init
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR) && make -C src install ROOT=$(ROOT)
|
@cd $(SRCDIR) && make -C src install ROOT=$(ROOT) && \
|
||||||
|
install -v -d -m 755 $(ROOT)/usr/share/sysvinit && \
|
||||||
|
install -v -m 644 $(SNAPDIR)/inittab $(ROOT)/usr/share/sysvinit
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
|
|||||||
43
SNAP/inittab
Normal file
43
SNAP/inittab
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Default runlevel
|
||||||
|
id:3:initdefault:
|
||||||
|
|
||||||
|
# This is the set of scripts that prepare the system prior to entering runlevels
|
||||||
|
si::sysinit:/etc/init.d/rc S
|
||||||
|
|
||||||
|
# /etc/init.d/rc executes the S and K scripts when runlevel is changed
|
||||||
|
#
|
||||||
|
# Runlevel 0 is halt.
|
||||||
|
# Runlevel 1 is single-user.
|
||||||
|
# Runlevel 2 is multi-user without networking.
|
||||||
|
# Runlevel 3 is multi-user with networking.
|
||||||
|
# Runlevel 4 is not used by default.
|
||||||
|
# Runlevel 5 is multi-user with GUI.
|
||||||
|
# Runlevel 6 is reboot.
|
||||||
|
|
||||||
|
l0:0:wait:/etc/init.d/rc 0
|
||||||
|
l1:1: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
|
||||||
|
|
||||||
|
# This allows ctrl-alt-del to reboot the system
|
||||||
|
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
|
||||||
|
|
||||||
|
# Single user mode
|
||||||
|
su:S1:respawn:/sbin/sulogin
|
||||||
|
|
||||||
|
# The following spawns agetty on tty1-6
|
||||||
|
#
|
||||||
|
# Format:
|
||||||
|
# id:runlevels:action:process
|
||||||
|
#
|
||||||
|
# More information is available with 'man inittab'
|
||||||
|
1:2345:respawn:/sbin/agetty --noclear --nohints tty1 38400
|
||||||
|
2:2345:respawn:/sbin/agetty --nohints tty2 38400
|
||||||
|
3:2345:respawn:/sbin/agetty --nohints tty3 38400
|
||||||
|
4:2345:respawn:/sbin/agetty --nohints tty4 38400
|
||||||
|
5:2345:respawn:/sbin/agetty --nohints tty5 38400
|
||||||
|
6:2345:respawn:/sbin/agetty --nohints tty6 38400
|
||||||
|
|
||||||
28
SNAP/usher
28
SNAP/usher
@@ -1,35 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
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
|
case $1 in
|
||||||
preinst)
|
preinst)
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
postinst)
|
postinst)
|
||||||
install -d -m 755 ${TARGET}/etc/init.d
|
install -d -m 755 /etc/init.d
|
||||||
install -d -m 755 ${TARGET}/etc/rc{[0-6],S}.d
|
install -d -m 755 /etc/rc{{0..6},S}.d
|
||||||
|
|
||||||
if [ ! -f ${TARGET}/etc/inittab ]; then
|
if [ ! -f /etc/inittab ]; then
|
||||||
echo "${INITTAB}" > ${TARGET}/etc/inittab
|
install -m 644 /usr/share/sysvinit/inittab /etc/inittab
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
prerm)
|
prerm)
|
||||||
|
|||||||
Reference in New Issue
Block a user