VERSION="0.6" SRCDIR="init-${VERSION}" TARBALL="${SRCDIR}.tar.xz" URL="http://infraroot.at/pygos" SHA256SUM="0a47cdeaf72a71a7cbc7440c42ff7db719ed92b4d39e99abe5af828a4d9fb664" DEPENDS="toolchain" prepare() { return } build() { run_configure "$1" make -j $NUMJOBS } deploy() { local SOURCE="$1" local DEPLOY="$2" local svc make DESTDIR="$DEPLOY" install cp -r ${SCRIPTDIR}/pkg/${PKGNAME}/{etc,lib,share} "$DEPLOY" cp "$SCRIPTDIR/pkg/$PKGNAME/rootfs_files.txt" "$DEPLOY" include_merge "INIT" if [ "x$HWCLOCK" == "xyes" ]; then 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" echo "etc/netcfg/ifrename m 644 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 "sysctl.conf") if [ ! -z "$svc" ]; then cp "$svc" "$DEPLOY/etc/sysctl.conf" echo "etc/sysctl.conf m 644 0 0" >> "$DEPLOY/rootfs_files.txt" fi svc=$(file_path_override "interfaces") if [ ! -z "$svc" ]; then echo "etc/init.d/ifcfg m 777 0 0" >> "$DEPLOY/rootfs_files.txt" for svc in $svc/*; do [ -f "$svc" ] || continue cp "$svc" "$DEPLOY/etc/netcfg/" svc=$(basename $svc) echo "etc/netcfg/$svc m 644 0 0" >> \ "$DEPLOY/rootfs_files.txt" done fi for svc in $GETTY_TTY; do ln -s "/share/init/agetty" "$DEPLOY/etc/init.d/agetty@$svc" echo "etc/init.d/agetty@$svc m 777 0 0" >> \ "$DEPLOY/rootfs_files.txt" done if [ ! -z "$DHCP_PORTS" ]; then SERVICES="$SERVICES dhcpcdmaster" fi for svc in $DHCP_PORTS; do ln -s "/share/init/dhcpcd" "$DEPLOY/etc/init.d/dhcpcd@$svc" echo "etc/init.d/dhcpcd@$svc m 777 0 0" >> \ "$DEPLOY/rootfs_files.txt" done for svc in $SERVICES; do ln -s "/share/init/$svc" "$DEPLOY/etc/init.d/$svc" echo "etc/init.d/$svc m 777 0 0" >> "$DEPLOY/rootfs_files.txt" done 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() { return }