aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox-initscripts/busybox-initscripts.post-install
blob: fab24cac62e1e750db32ab2b19e1466699245c6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

# this is for upgraders
addgroup -S -g 23 input 2>/dev/null

# this is for upgraders
if [ -L /etc/runlevels/boot/mdev ] && ! [ -L /etc/runlevels/sysinit/mdev ]; then
	mkdir -p /etc/runlevels/sysinit
	mv /etc/runlevels/boot/mdev /etc/runlevels/sysinit/ 2>/dev/null
fi

# cron was renamed to crond
for link in /run/openrc/*/cron /etc/runlevels/*/cron; do
	if [ -L "$link" ] && ! [ -L "${link}d" ]; then
		target="$(readlink $link)"
		ln -s "${target}d" "${link}d"
		rm "$link"
		continue
	fi
	if [ -d "$link" ] && ! [ -d "${link}d" ]; then
		mv "$link" "${link}d"
	fi
done

exit 0