1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-05 03:27:10 +01:00

Bump init version

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-07-20 17:43:39 +02:00
parent 3e71e3d03a
commit 360a9538c5
4 changed files with 47 additions and 15 deletions

View file

@ -2,3 +2,4 @@ GETTY_TTY="ttyS0"
HWCLOCK="yes"
DHCP_PORTS=""
SERVICES=""
MODULES=""

View file

@ -2,3 +2,4 @@ GETTY_TTY="tty1 tty2 tty3 tty4 tty5 tty6 tty7"
DHCP_PORTS=""
HWCLOCK="no"
SERVICES=""
MODULES=""

View file

@ -1,8 +1,8 @@
VERSION="0.4"
VERSION="0.5"
SRCDIR="init-${VERSION}"
TARBALL="${SRCDIR}.tar.xz"
URL="http://infraroot.at/pygos"
SHA256SUM="a128be18bbabca600e0553ec539e953eda0a467a337826d520c5fe3ef893ab03"
SHA256SUM="ea964c7ef150c14987bce0eff10b80a5e071b0ac451fe2e3d9e12915d5a2f987"
DEPENDS="toolchain"
prepare() {
@ -32,17 +32,32 @@ deploy() {
include_merge "INIT"
if [ "x$HWCLOCK" == "xyes" ]; then
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock"
echo "etc/init.d/hwclock m 777 0 0" >> "$DEPLOY/rootfs_files.txt"
SERVICES="$SERVICES hwclock"
else
SERVICES="$SERVICES swclock"
ln -s "/share/init/swclocksave" "$DEPLOY/etc/init.d/swclocksave@shutdown"
ln -s "/share/init/swclocksave" "$DEPLOY/etc/init.d/swclocksave@reboot"
echo "etc/init.d/swclocksave@shutdown m 777 0 0" >> "$DEPLOY/rootfs_files.txt"
echo "etc/init.d/swclocksave@reboot m 777 0 0" >> "$DEPLOY/rootfs_files.txt"
mkdir -p "$DEPLOY/var/lib"
date --utc +%m%d%H%M%Y.%S > "$DEPLOY/var/lib/swclock"
echo "var/lib/swclock m 644 0 0" >> "$DEPLOY/rootfs_files.txt"
fi
svc=$(file_path_override "ifrename")
if [ ! -z "$svc" ]; then
cp "$svc" "$DEPLOY/etc/netcfg/ifrename"
ln -s "/share/init/ifrename" "$DEPLOY/etc/init.d/ifrename"
echo "etc/netcfg/ifrename m 644 0 0" >> "$DEPLOY/rootfs_files.txt"
echo "etc/init.d/ifrename m 777 0 0" >> "$DEPLOY/rootfs_files.txt"
SERVICES="$SERVICES ifrename"
fi
svc=$(file_path_override "nftables.rules")
if [ ! -z "$svc" ]; then
cp "$svc" "$DEPLOY/etc/nftables.rules"
echo "etc/nftables.rules m 644 0 0" >> "$DEPLOY/rootfs_files.txt"
SERVICES="$SERVICES nft"
fi
svc=$(file_path_override "interfaces")
@ -65,11 +80,7 @@ deploy() {
done
if [ ! -z "$DHCP_PORTS" ]; then
ln -s "/share/init/dhcpcdmaster" \
"$DEPLOY/etc/init.d/dhcpcdmaster"
echo "etc/init.d/dhcpcdmaster m 777 0 0" >> \
"$DEPLOY/rootfs_files.txt"
SERVICES="$SERVICES dhcpcdmaster"
fi
for svc in $DHCP_PORTS; do
@ -84,7 +95,12 @@ deploy() {
echo "etc/init.d/$svc m 777 0 0" >> "$DEPLOY/rootfs_files.txt"
done
unset -v i GETTY_TTY HWCLOCK DHCP_PORTS SERVICES
touch "$DEPLOY/etc/modules"
for svc in $MODULES; do
echo "$svc" >> "$DEPLOY/etc/modules"
done
unset -v i GETTY_TTY HWCLOCK DHCP_PORTS SERVICES MODULES
}
check_update() {

View file

@ -11,6 +11,8 @@ lib/libexec/init/devfs.sh m 555 0 0
lib/libexec/init/trymount.sh m 555 0 0
lib/libexec/init/ifrename.sh m 555 0 0
lib/libexec/init/ifcfg.sh m 555 0 0
lib/libexec/init/ifdown.sh m 555 0 0
lib/libexec/init/modules_load.sh m 555 0 0
lib/libexec/init/overlay.sh m 555 0 0
share/init m 555 0 0
share/init/agetty m 444 0 0
@ -39,7 +41,15 @@ share/init/usyslogd m 444 0 0
share/init/mountusr m 444 0 0
share/init/tmpfsrun m 444 0 0
share/init/tmpfsvar m 444 0 0
share/init/network m 444 0 0
share/init/ifdown m 444 0 0
share/init/modules m 444 0 0
share/init/hostapd m 444 0 0
share/init/swclock m 444 0 0
share/init/swclocksave m 444 0 0
share/init/nft m 444 0 0
etc/netcfg m 755 0 0
etc/modules m 644 0 0
etc/initd.env m 644 0 0
etc/init.d m 755 0 0
etc/init.d/loopback m 777 0 0
@ -63,3 +73,7 @@ etc/init.d/mountusr m 777 0 0
etc/init.d/tmpfsrun m 777 0 0
etc/init.d/tmpfsvar m 777 0 0
etc/init.d/usyslogd m 777 0 0
etc/init.d/modules m 777 0 0
etc/init.d/network m 777 0 0
etc/init.d/ifdown@shutdown m 777 0 0
etc/init.d/ifdown@reboot m 777 0 0