summaryrefslogtreecommitdiff
path: root/extra/openrc/openrc.post-install
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
committerdavidovski <david@davidovski.xyz>2022-05-04 23:52:30 +0100
commit739c65c54cb0e957df5e9b76f93fb02554e5cac3 (patch)
tree09ddfa0a342f3ea9de136cb50abdd79821bf1b53 /extra/openrc/openrc.post-install
parent4c585ad54388285500fd18a6aaa516894e0f2c16 (diff)
moved everything to new file formatting
Diffstat (limited to 'extra/openrc/openrc.post-install')
-rw-r--r--extra/openrc/openrc.post-install38
1 files changed, 0 insertions, 38 deletions
diff --git a/extra/openrc/openrc.post-install b/extra/openrc/openrc.post-install
deleted file mode 100644
index 1c27350..0000000
--- a/extra/openrc/openrc.post-install
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-
-rc_update() {
- local svc="$1"
- local level="$2"
- mkdir -p /etc/runlevels/$level
- ln -sf /etc/init.d/$svc /etc/runlevels/$level
-}
-
-if [ ! -d etc/rcS.d ] && [ ! -d etc/rcL.d ]; then
- exit 0
-fi
-
-for i in etc/rc[SL].d/*; do
- [ -L "$i" ] || continue
- oldsvc=${i##*/S[0-9][0-9]}
- # some services are renamed
- case "$oldsvc" in
- modutils) svc=modules;;
- procps) svc=sysctl;;
- bootmisc.sh) svc=bootmisc;;
- keymap) svc=keymaps;;
- rc.local) svc=local;;
- *) svc=$oldsvc;;
- esac
-
- # add the service to correct "runlevel"
- case "$svc" in
- syslog|klogd)
- rc_update $svc sysinit;;
- hwclock|modules|sysctl|hostname|keymaps|bootmisc)
- rc_update $svc boot;;
- *) rc_update $svc default;;
- esac
-
- rm $i
-done
-