summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perp/.footprint59
-rw-r--r--perp/.md5sum1
-rw-r--r--perp/Pkgfile19
-rw-r--r--perp/post-install4
-rw-r--r--sinit/.footprint13
-rw-r--r--sinit/.md5sum5
-rw-r--r--sinit/Pkgfile33
-rw-r--r--sinit/poweroff2
-rw-r--r--sinit/rc.conf3
-rw-r--r--sinit/rc.init72
-rw-r--r--sinit/rc.shutdown47
-rw-r--r--sinit/reboot2
12 files changed, 260 insertions, 0 deletions
diff --git a/perp/.footprint b/perp/.footprint
new file mode 100644
index 0000000..d2a965e
--- /dev/null
+++ b/perp/.footprint
@@ -0,0 +1,59 @@
1drwxr-xr-x root/root sbin/
2-rwxr-xr-x root/root sbin/perp-setup
3-rwxr-xr-x root/root sbin/perpboot
4-rwxr-xr-x root/root sbin/perpctl
5-rwxr-xr-x root/root sbin/perpd
6-rwxr-xr-x root/root sbin/perphup
7-rwxr-xr-x root/root sbin/perpls
8-rwxr-xr-x root/root sbin/perpok
9-rwxr-xr-x root/root sbin/perpstat
10-rwxr-xr-x root/root sbin/runargs
11-rwxr-xr-x root/root sbin/runargv0
12-rwxr-xr-x root/root sbin/runchoom
13-rwxr-xr-x root/root sbin/rundetach
14-rwxr-xr-x root/root sbin/rundeux
15-rwxr-xr-x root/root sbin/runenv
16-rwxr-xr-x root/root sbin/runfile
17-rwxr-xr-x root/root sbin/runlimit
18-rwxr-xr-x root/root sbin/runlock
19-rwxr-xr-x root/root sbin/runpause
20-rwxr-xr-x root/root sbin/runsession
21-rwxr-xr-x root/root sbin/runtool
22-rwxr-xr-x root/root sbin/runtrap
23-rwxr-xr-x root/root sbin/runuid
24-rwxr-xr-x root/root sbin/sissylog
25-rwxr-xr-x root/root sbin/tinylog
26-rwxr-xr-x root/root sbin/tinylog_run
27drwxr-xr-x root/root usr/
28drwxr-xr-x root/root usr/share/
29drwxr-xr-x root/root usr/share/man/
30drwxr-xr-x root/root usr/share/man/man5/
31-rw-r--r-- root/root usr/share/man/man5/perpetrate.5.gz
32drwxr-xr-x root/root usr/share/man/man8/
33-rw-r--r-- root/root usr/share/man/man8/perp-setup.8.gz
34-rw-r--r-- root/root usr/share/man/man8/perp_intro.8.gz
35-rw-r--r-- root/root usr/share/man/man8/perpboot.8.gz
36-rw-r--r-- root/root usr/share/man/man8/perpctl.8.gz
37-rw-r--r-- root/root usr/share/man/man8/perpd.8.gz
38-rw-r--r-- root/root usr/share/man/man8/perpetrate.8.gz
39-rw-r--r-- root/root usr/share/man/man8/perphup.8.gz
40-rw-r--r-- root/root usr/share/man/man8/perpls.8.gz
41-rw-r--r-- root/root usr/share/man/man8/perpok.8.gz
42-rw-r--r-- root/root usr/share/man/man8/perpstat.8.gz
43-rw-r--r-- root/root usr/share/man/man8/runargs.8.gz
44-rw-r--r-- root/root usr/share/man/man8/runargv0.8.gz
45-rw-r--r-- root/root usr/share/man/man8/runchoom.8.gz
46-rw-r--r-- root/root usr/share/man/man8/rundetach.8.gz
47-rw-r--r-- root/root usr/share/man/man8/rundeux.8.gz
48-rw-r--r-- root/root usr/share/man/man8/runenv.8.gz
49-rw-r--r-- root/root usr/share/man/man8/runfile.8.gz
50-rw-r--r-- root/root usr/share/man/man8/runlimit.8.gz
51-rw-r--r-- root/root usr/share/man/man8/runlock.8.gz
52-rw-r--r-- root/root usr/share/man/man8/runpause.8.gz
53-rw-r--r-- root/root usr/share/man/man8/runsession.8.gz
54-rw-r--r-- root/root usr/share/man/man8/runtool.8.gz
55-rw-r--r-- root/root usr/share/man/man8/runtools_intro.8.gz
56-rw-r--r-- root/root usr/share/man/man8/runtrap.8.gz
57-rw-r--r-- root/root usr/share/man/man8/runuid.8.gz
58-rw-r--r-- root/root usr/share/man/man8/sissylog.8.gz
59-rw-r--r-- root/root usr/share/man/man8/tinylog.8.gz
diff --git a/perp/.md5sum b/perp/.md5sum
new file mode 100644
index 0000000..d3ab623
--- /dev/null
+++ b/perp/.md5sum
@@ -0,0 +1 @@
a2acc7425d556d9635a25addcee9edb5 perp-2.07.tar.gz
diff --git a/perp/Pkgfile b/perp/Pkgfile
new file mode 100644
index 0000000..af63eca
--- /dev/null
+++ b/perp/Pkgfile
@@ -0,0 +1,19 @@
1# Description: persistent process supervisor/service managment framework
2# URL: http://b0llix.net/perp/
3# Maintainer: Shokara Kou, kou at 13f0 dot net
4# Depends on:
5
6name=perp
7version=2.07
8release=1
9source=(http://b0llix.net/$name/distfiles/$name-$version.tar.gz)
10
11build() {
12 cd $name-$version
13
14 sed '/BINDIR/ s/\/usr//' conf.mk > conf.mk.tmp
15 mv conf.mk.tmp conf.mk
16
17 make
18 make DESTDIR=$PKG install
19}
diff --git a/perp/post-install b/perp/post-install
new file mode 100644
index 0000000..9a47bdc
--- /dev/null
+++ b/perp/post-install
@@ -0,0 +1,4 @@
1#!/bin/sh
2groupadd log
3useradd -r log
4perp-setup /etc/perp
diff --git a/sinit/.footprint b/sinit/.footprint
new file mode 100644
index 0000000..92edcc3
--- /dev/null
+++ b/sinit/.footprint
@@ -0,0 +1,13 @@
1drwxr-xr-x root/root bin/
2-rwxr-xr-x root/root bin/poweroff
3-rwxr-xr-x root/root bin/reboot
4-rwxr-xr-x root/root bin/sinit
5drwxr-xr-x root/root etc/
6-rw-r--r-- root/root etc/rc.conf
7-rwxr-xr-x root/root etc/rc.init
8-rwxr-xr-x root/root etc/rc.shutdown
9drwxr-xr-x root/root sbin/
10lrwxrwxrwx root/root sbin/init -> /bin/sinit
11drwxr-xr-x root/root usr/
12drwxr-xr-x root/root usr/man8/
13-rw-r--r-- root/root usr/man8/sinit.8
diff --git a/sinit/.md5sum b/sinit/.md5sum
new file mode 100644
index 0000000..f1cf8fc
--- /dev/null
+++ b/sinit/.md5sum
@@ -0,0 +1,5 @@
1dfd17c0b4f0ce941f4b7492e497fae0b poweroff
29ce036092ec6320a2f5d27abc41a25b7 rc.conf
3a55a9362936986a1aad4b9a4186722a4 rc.init
437d30c23a48271712ae53175be980423 rc.shutdown
5415e4e2648e9bb30e9281c3e5e48f48e reboot
diff --git a/sinit/Pkgfile b/sinit/Pkgfile
new file mode 100644
index 0000000..738a01a
--- /dev/null
+++ b/sinit/Pkgfile
@@ -0,0 +1,33 @@
1# Description: suckless init, based on felker's minimal init
2# URL: https://git.suckless.org/sinit/file/README.html
3# Maintainer: Shokara Kou, kou at 13f0 dot net
4# Depends on:
5
6name=sinit
7commit=28c44b6
8version=git-$commit
9release=1
10source=(poweroff reboot rc.conf rc.init rc.shutdown)
11
12gitsource=git://git.suckless.org/$name/
13
14build() {
15 git clone $gitsource
16 cd $name
17 git checkout $commit
18
19 sed 's/bin/etc/' config.def.h >config.h
20
21 make
22 make PREFIX=/ MANPREFIX=/usr DESTDIR=$PKG install
23
24 mkdir $PKG/sbin
25 ln -s /bin/sinit $PKG/sbin/init
26
27 install -Dt $PKG/bin -m755 $SRC/poweroff
28 install -Dt $PKG/bin -m755 $SRC/reboot
29
30 install -Dt $PKG/etc -m644 $SRC/rc.conf
31 install -Dt $PKG/etc -m755 $SRC/rc.init
32 install -Dt $PKG/etc -m755 $SRC/rc.shutdown
33}
diff --git a/sinit/poweroff b/sinit/poweroff
new file mode 100644
index 0000000..b33bc03
--- /dev/null
+++ b/sinit/poweroff
@@ -0,0 +1,2 @@
1#!/bin/sh
2kill -USR1 1
diff --git a/sinit/rc.conf b/sinit/rc.conf
new file mode 100644
index 0000000..5cf7280
--- /dev/null
+++ b/sinit/rc.conf
@@ -0,0 +1,3 @@
1HOSTNAME=crux
2INTERFACE=eth0
3TIMEZONE="UTC"
diff --git a/sinit/rc.init b/sinit/rc.init
new file mode 100644
index 0000000..aab0073
--- /dev/null
+++ b/sinit/rc.init
@@ -0,0 +1,72 @@
1#!/bin/sh
2umask 022
3
4. /etc/rc.conf
5
6echo "CRUX booting"
7
8/bin/mount -n -t proc -o nosuid,noexec,nodev proc /proc
9/bin/mount -n -t sysfs -o nosuid,noexec,nodev sysfs /sys
10
11/bin/mount -n -t tmpfs -o nosuid,mode=0755 dev /dev
12/bin/mkdir -p /dev/pts
13/bin/mount -n -t devpts -o gid=5,mode=0620 devpts /dev/pts
14
15/bin/mount -o remount,ro /
16
17echo Running smdev
18/bin/smdev -s
19
20echo Setting smdev as the kernel hotplug
21echo /bin/smdev >/proc/sys/kernel/hotplug
22
23cd /dev
24/bin/ln -sf /proc/self/fd/0 stdin
25/bin/ln -sf /proc/self/fd/1 stdout
26/bin/ln -sf /proc/self/fd/2 stderr
27/bin/ln -sf /proc/self/fd fd
28cd - >/dev/null
29
30echo Checking filesystems
31/bin/fsck -ATa
32if [ $? -eq 1 ]; then
33 echo Filesystems error exist, fix manually.
34 /bin/sh
35 /bin/halt -r
36fi
37
38echo Remounting root as read-write
39/bin/mount -o remount,rw /
40
41echo Mounting filesystems
42/bin/mount -a
43
44/bin/hostname $HOSTNAME
45
46echo Bringing up loopback
47/bin/ip addr add 127.0.0.1/8 dev lo broadcast + scope host
48/bin/ip link set lo up
49
50echo Setting hwclock
51[ -n "$TIMEZONE" ] && export TZ="$TIMEZONE"
52/bin/hwclock -s -u /dev/rtc0
53unset TZ
54
55[ -f /etc/random-seed ] && /bin/cat /etc/random-seed >/dev/urandom
56/bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
57
58echo Enabling core dumps
59ulimit -c unlimited
60
61if [ -x /etc/rc.local ]; then
62 echo Running rc.local
63 /etc/rc.local
64fi
65
66: >/var/run/utmp
67
68echo
69/bin/sh -c '/bin/respawn /bin/getty /dev/tty1 linux' &>/dev/null &
70/bin/sh -c '/bin/respawn /bin/getty /dev/tty2 linux' &>/dev/null &
71/bin/sh -c '/bin/respawn /bin/getty /dev/tty3 linux' &>/dev/null &
72/bin/sh -c '/bin/respawn /bin/getty /dev/tty4 linux' &>/dev/null &
diff --git a/sinit/rc.shutdown b/sinit/rc.shutdown
new file mode 100644
index 0000000..24cc606
--- /dev/null
+++ b/sinit/rc.shutdown
@@ -0,0 +1,47 @@
1#!/bin/sh
2umask 022
3
4. /etc/rc.conf
5
6case "$1" in
7reboot|poweroff) ;;
8*)
9 echo "Invalid action '$1' for rc.shutdown" >&2
10 exit 1
11 ;;
12esac
13
14# avoid staircase effect by setting linefeed mode
15echo; /bin/stty onlcr
16
17echo Shutting down
18
19echo Saving system clock
20[ -n "$TIMEZONE" ] && export TZ="$TIMEZONE"
21/bin/hwclock -w -u /dev/rtc0
22unset TZ
23
24/bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
25
26echo Sending TERM to all processes
27/bin/killall5 -s TERM
28/bin/sleep 3
29echo Sending KILL to all processes
30/bin/killall5 -s KILL
31
32echo Remounting root as read-only
33/bin/mount -o remount,ro /
34
35echo Unmounting filesystems
36/bin/umount -a
37
38/bin/sync
39/bin/sleep 3
40wait
41
42echo Good bye.
43
44case "$1" in
45reboot) /bin/halt -r ;;
46poweroff) /bin/halt -p ;;
47esac
diff --git a/sinit/reboot b/sinit/reboot
new file mode 100644
index 0000000..3d05840
--- /dev/null
+++ b/sinit/reboot
@@ -0,0 +1,2 @@
1#!/bin/sh
2kill -INT 1