1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-22 11:09:46 +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" HWCLOCK="yes"
DHCP_PORTS="" DHCP_PORTS=""
SERVICES="" SERVICES=""
MODULES=""

View file

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

View file

@ -1,8 +1,8 @@
VERSION="0.4" VERSION="0.5"
SRCDIR="init-${VERSION}" SRCDIR="init-${VERSION}"
TARBALL="${SRCDIR}.tar.xz" TARBALL="${SRCDIR}.tar.xz"
URL="http://infraroot.at/pygos" URL="http://infraroot.at/pygos"
SHA256SUM="a128be18bbabca600e0553ec539e953eda0a467a337826d520c5fe3ef893ab03" SHA256SUM="ea964c7ef150c14987bce0eff10b80a5e071b0ac451fe2e3d9e12915d5a2f987"
DEPENDS="toolchain" DEPENDS="toolchain"
prepare() { prepare() {
@ -32,17 +32,32 @@ deploy() {
include_merge "INIT" include_merge "INIT"
if [ "x$HWCLOCK" == "xyes" ]; then if [ "x$HWCLOCK" == "xyes" ]; then
ln -s "/share/init/hwclock" "$DEPLOY/etc/init.d/hwclock" SERVICES="$SERVICES hwclock"
echo "etc/init.d/hwclock m 777 0 0" >> "$DEPLOY/rootfs_files.txt" 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 fi
svc=$(file_path_override "ifrename") svc=$(file_path_override "ifrename")
if [ ! -z "$svc" ]; then if [ ! -z "$svc" ]; then
cp "$svc" "$DEPLOY/etc/netcfg/ifrename" 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/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 fi
svc=$(file_path_override "interfaces") svc=$(file_path_override "interfaces")
@ -65,11 +80,7 @@ deploy() {
done done
if [ ! -z "$DHCP_PORTS" ]; then if [ ! -z "$DHCP_PORTS" ]; then
ln -s "/share/init/dhcpcdmaster" \ SERVICES="$SERVICES dhcpcdmaster"
"$DEPLOY/etc/init.d/dhcpcdmaster"
echo "etc/init.d/dhcpcdmaster m 777 0 0" >> \
"$DEPLOY/rootfs_files.txt"
fi fi
for svc in $DHCP_PORTS; do for svc in $DHCP_PORTS; do
@ -84,7 +95,12 @@ deploy() {
echo "etc/init.d/$svc m 777 0 0" >> "$DEPLOY/rootfs_files.txt" echo "etc/init.d/$svc m 777 0 0" >> "$DEPLOY/rootfs_files.txt"
done 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() { 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/trymount.sh m 555 0 0
lib/libexec/init/ifrename.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/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 lib/libexec/init/overlay.sh m 555 0 0
share/init m 555 0 0 share/init m 555 0 0
share/init/agetty m 444 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/mountusr m 444 0 0
share/init/tmpfsrun m 444 0 0 share/init/tmpfsrun m 444 0 0
share/init/tmpfsvar 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/netcfg m 755 0 0
etc/modules m 644 0 0
etc/initd.env m 644 0 0 etc/initd.env m 644 0 0
etc/init.d m 755 0 0 etc/init.d m 755 0 0
etc/init.d/loopback m 777 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/tmpfsrun m 777 0 0
etc/init.d/tmpfsvar m 777 0 0 etc/init.d/tmpfsvar m 777 0 0
etc/init.d/usyslogd 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