1
0
Fork 0
mirror of https://github.com/pygos/init-scripts.git synced 2024-05-18 11:46:15 +02:00

Compare commits

...

17 commits
v1 ... master

Author SHA1 Message Date
David Oberhollenzer 9e08d160bc Bump version number
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-09-18 13:07:09 +02:00
David Oberhollenzer 418ca4bc72 Propperly unmount the overlay partition on shutdown
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-09-18 13:07:09 +02:00
David Oberhollenzer 628adf2e03 Move contents of devfs.sh script into service file
Conditionals can be eliminated, since we know exactely what the
situation looks like on Linux.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-09-18 13:07:09 +02:00
David Oberhollenzer 7ecb124df2 Replace static network config script with iproute2 batch file
A lot simpler than make-shift DSL parsing with bash.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-08-11 01:41:28 +02:00
David Oberhollenzer 0309ede4b8 Release version 3
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 18:59:15 +01:00
David Oberhollenzer 36c14c147d Cleanup overlay script
- Create the upper and work dirs if they don't exist yet.
 - If the target doesn't exist, let it fail. The configuration
   is bonkers.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-29 18:31:45 +01:00
David Oberhollenzer 98d5ba81be dhcpcd: wait for master socket
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-24 18:14:07 +01:00
David Oberhollenzer 244f4bbe7a Run various services in foreground
This commit changes dhpcd master and nginx scripts to run the respective
processes in background and let initd supervise them directly.

Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-20 20:52:55 +01:00
David Oberhollenzer 655daedb93 Update e-mail address
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-03-14 17:19:34 +01:00
David Oberhollenzer 858ea8c384 Release version 2
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-25 19:05:47 +01:00
David Oberhollenzer ab827498ce Remove superflous escapes in swclock cron job
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-25 19:05:47 +01:00
David Oberhollenzer b67b00ac6f Update documentation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 22:22:50 +01:00
David Oberhollenzer f86d76513a Add dhcpcd hook for swclock
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 22:16:50 +01:00
David Oberhollenzer 6ed7e164c8 Add configure flag for dhcpcd
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 22:16:50 +01:00
David Oberhollenzer 39fcca747f Add enable flag for software pseudo RTC
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 22:16:39 +01:00
David Oberhollenzer 49fe9bd77d Implement init/cron split
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-23 12:24:26 +01:00
David Oberhollenzer b6c97e117c Remove possible bashisms
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-11-17 16:40:15 +01:00
28 changed files with 168 additions and 195 deletions

7
.gitignore vendored
View file

@ -8,8 +8,6 @@ configure
install-sh
missing
reboot
scripts/devfs.sh
scripts/ifcfg.sh
scripts/ifrename.sh
scripts/modules_load.sh
services/devfs
@ -26,9 +24,10 @@ services/sshd
services/sshd_keygen
services/swclock
services/swclocksave
services/swclocksave.gcron
services/sysfs
services/mountusr
services/ntpsetdate.gcron
services/tmpfsvar
services/dhcpcd
crontab/swclock
etc/40-ntpsetdate
.#*

View file

@ -1,4 +1,4 @@
Copyright (c) 2018 David Oberhollenzer <david.oberhollenzer@tele2.at>
Copyright (c) 2018 David Oberhollenzer <goliath@infraroot.at>
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above

View file

@ -8,8 +8,17 @@ helperdir = @SCRIPTDIR@
helper_PROGRAMS =
helper_SCRIPTS =
dhcpcddir = @DHCPCDHOOKDIR@
if SWCLOCK
if DHCPCLIENT
dhcpcd_DATA = etc/40-ntpsetdate
endif
endif
include scripts/Makemodule.am
include services/Makemodule.am
include crontab/Makemodule.am
install-data-local:
$(MKDIR_P) $(DESTDIR)$(SVCDIR)
@ -26,10 +35,12 @@ install-data-local:
$(LN_S) $(TEMPLATEDIR)/sync $(DESTDIR)$(SVCDIR)/sync@shutdown
$(LN_S) $(TEMPLATEDIR)/sigkill $(DESTDIR)$(SVCDIR)/sigkill@shutdown
$(LN_S) $(TEMPLATEDIR)/sigterm $(DESTDIR)$(SVCDIR)/sigterm@shutdown
$(LN_S) $(TEMPLATEDIR)/unmount $(DESTDIR)$(SVCDIR)/unmount@shutdown
$(LN_S) $(TEMPLATEDIR)/sync $(DESTDIR)$(SVCDIR)/sync@reboot
$(LN_S) $(TEMPLATEDIR)/sigkill $(DESTDIR)$(SVCDIR)/sigkill@reboot
$(LN_S) $(TEMPLATEDIR)/sigterm $(DESTDIR)$(SVCDIR)/sigterm@reboot
$(LN_S) $(TEMPLATEDIR)/ifdown $(DESTDIR)$(SVCDIR)/ifdown@reboot
$(LN_S) $(TEMPLATEDIR)/unmount $(DESTDIR)$(SVCDIR)/unmount@reboot
$(LN_S) $(TEMPLATEDIR)/ifcfg $(DESTDIR)$(SVCDIR)/ifcfg
$(LN_S) $(TEMPLATEDIR)/modules $(DESTDIR)$(SVCDIR)/modules
$(LN_S) $(TEMPLATEDIR)/network $(DESTDIR)$(SVCDIR)/network
@ -38,5 +49,12 @@ install-data-local:
$(LN_S) $(TEMPLATEDIR)/mountusr $(DESTDIR)$(SVCDIR)/mountusr
$(LN_S) $(TEMPLATEDIR)/tmpfsrun $(DESTDIR)$(SVCDIR)/tmpfsrun
$(LN_S) $(TEMPLATEDIR)/tmpfsvar $(DESTDIR)$(SVCDIR)/tmpfsvar
$(MKDIR_P) $(DESTDIR)$(GCRONDIR)
$(LN_S) $(TEMPLATEDIR)/gcrond $(DESTDIR)$(SVCDIR)/gcrond
if DHCPCLIENT
$(LN_S) $(TEMPLATEDIR)/dhcpcdmaster $(DESTDIR)$(SVCDIR)/dhcpcdmaster
endif
if SWCLOCK
$(LN_S) $(TEMPLATEDIR)/swclock $(DESTDIR)$(SVCDIR)/swclock
$(LN_S) $(TEMPLATEDIR)/swclocksave $(DESTDIR)$(SVCDIR)/swclocksave@reboot
$(LN_S) $(TEMPLATEDIR)/swclocksave $(DESTDIR)$(SVCDIR)/swclocksave@shutdown
endif

View file

@ -7,3 +7,6 @@ service configuration and further, available services.
See [docs/network.md](docs/network.md) for a description on how to do static
network configuration with the provided script and service.
See [docs/swclock.md](docs/swclock.md) for a description on the software pseudo
RTC implementation for systems that do not have a hardware real time clock.

View file

@ -1,6 +1,6 @@
AC_PREREQ([2.60])
AC_INIT([init-scripts], [1], [david.oberhollenzer@tele2.at], init-scripts)
AC_INIT([init-scripts], [4], [goliath@infraroot.at], init-scripts)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz])
AM_SILENT_RULES([yes])
@ -9,9 +9,10 @@ AC_PROG_MKDIR_P
AC_PROG_LN_S
AC_DEFINE_DIR(SVCDIR, sysconfdir/init.d, [Startup service directory])
AC_DEFINE_DIR(GCRONDIR, sysconfdir/gcron.d, [Cron service directory])
AC_DEFINE_DIR(GCRONDIR, sysconfdir/crontab.d, [Cron service directory])
AC_DEFINE_DIR(TEMPLATEDIR, datadir/init, [Service template directory])
AC_DEFINE_DIR(SCRIPTDIR, libexecdir/init, [Helper script directory])
AC_DEFINE_DIR(DHCPCDHOOKDIR, libexecdir/dhcpcd-hooks, [DHCPCD hook directory])
AC_DEFINE_DIR(SBINPATH, sbindir, [Fully evaluated sbin directory])
AC_DEFINE_DIR(ETCPATH, sysconfdir, [Fulle evaluated etc directory])
@ -29,16 +30,34 @@ AC_CONFIG_FILES([services/modules])
AC_CONFIG_FILES([services/hostapd])
AC_CONFIG_FILES([services/swclock])
AC_CONFIG_FILES([services/swclocksave])
AC_CONFIG_FILES([services/swclocksave.gcron])
AC_CONFIG_FILES([services/nft])
AC_CONFIG_FILES([services/sshd])
AC_CONFIG_FILES([services/sshd_keygen])
AC_CONFIG_FILES([services/mountusr])
AC_CONFIG_FILES([services/ntpsetdate.gcron])
AC_CONFIG_FILES([services/tmpfsvar])
AC_CONFIG_FILES([scripts/devfs.sh])
AC_CONFIG_FILES([services/dhcpcd])
AC_CONFIG_FILES([scripts/ifrename.sh])
AC_CONFIG_FILES([scripts/ifcfg.sh])
AC_CONFIG_FILES([scripts/modules_load.sh])
AC_CONFIG_FILES([crontab/swclock])
AC_CONFIG_FILES([etc/40-ntpsetdate])
AC_ARG_ENABLE([swclock],
[AS_HELP_STRING([--enable-swclock], [Enable software pseudo RTC])],
[case "${enableval}" in
yes) AM_CONDITIONAL([SWCLOCK], [true]) ;;
no) AM_CONDITIONAL([SWCLOCK], [false]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-swclock]) ;;
esac],
[AM_CONDITIONAL([SWCLOCK], [false])])
AC_ARG_ENABLE([dhcpclient],
[AS_HELP_STRING([--enable-dhcpclient], [Enable DHCP client])],
[case "${enableval}" in
yes) AM_CONDITIONAL([DHCPCLIENT], [true]) ;;
no) AM_CONDITIONAL([DHCPCLIENT], [false]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-dhcpclient]) ;;
esac],
[AM_CONDITIONAL([DHCPCLIENT], [false])])
AC_OUTPUT([Makefile])

6
crontab/Makemodule.am Normal file
View file

@ -0,0 +1,6 @@
crondir = @GCRONDIR@
cron_DATA =
if SWCLOCK
cron_DATA += crontab/swclock
endif

2
crontab/swclock.in Normal file
View file

@ -0,0 +1,2 @@
5 */4 * * * @SCRIPTDIR@/setntpdate.sh > /dev/null
@hourly date --utc +%m%d%H%M%Y.%S > @STATEFILESPATH@/swclock

View file

@ -90,6 +90,8 @@ For the shutdown and reboot targets, the following services are executed:
* sigterm - send the SIGTERM signal to all processes and wait for 5 seconds
* sigkill - send the SIGKILL signal to all remaining processes
* ifdown - bring all network interfaces down
* unmount - unmount the overlay mount points and the underlying
writeable filesystem
* sync - run the sync command
@ -113,10 +115,6 @@ For the shutdown and reboot targets, the following services are executed:
kernels clock from the hardware at bootup, between the `vfs` and `sysinit`
targets.
* nft - If enabled, restores net filter table rules during boot.
* swclock - For systems that don't have a hardware clock, this service
restores a somewhat usable time from a file during boot.
* swclocksave - For systems that don't have a hardware clock, this service
saves the current time to a file during shutdown or reboot.
* sshd_keygen - A wait type service that generates host keys for the OpenSSH
server and then disables itself.
* sshd - Starts an OpenSSH server after the network pseudo service and after

View file

@ -34,46 +34,12 @@ Extension cards or external network adapters should be given a different prefix
to avoid changes in the order as they come and go.
## Interface Configuration
## Static Interface and Route Configuration
After interface renaming, for each network interface, the configuration path is
scanned for files with the same name as the interface.
Each successfully found configuration file is processed line by line, top to
bottom. Each line may contain a keyword, followed by multiple arguments.
The following keywords can be used to add IPv4 or IPv6 network addresses to
an interface:
* address
* addr
* ip
* ip6
* ipv6
Those commands are expected to be followed by an IPv4 or IPv6 address and
network mask.
Furthermore, the following commands can be used for configuring interface
parameters:
* `arp {on|off}`
* `multicast {on|off}`
* `mtu <value>`
* `offload [rx {on|off}] [tx {on|off}] [sg {on|off}] [tso {on|off}]`
* `offload [gso {on|off}] [gro {on|off}] [lro {on|off}] [rxvlan {on|off}]`
* `offload [txvlan {on|off}] [ntuple {on|off}] [rxhash {on|off}]`
* `offload [ufo {on|off}]`
## Route Configuration
After interface configuration is done, routes and rules are restored from a
file named `routes` in the same configuration path.
The file may contain lines starting with `route` or `rule`. Everything that
follows is passed on to `ip route add` or `ip rule add` respectively.
After interface renaming, an iproute2 batch script `/etc/netcfg/static` is
executed with the `-force` option is set, i.e. it will plough throug the
entire script without aborting, but the service will be marked as having
failed if any of the batch lines fail.
## Net Filter Tables
@ -81,3 +47,14 @@ follows is passed on to `ip route add` or `ip rule add` respectively.
An additional service is provided that restores the nft rule set from
`/etc/nftables.rules`.
# DHCP based network configuration
If the configure option `--enable-dhcpclient` is set, two services are added.
The service `dhpcdmaster` launches a global dhcpcd instance.
For each port that should be configured via DHCP, the service `dhcpcd` needs
to be enabled manually with the port name as argument. The service the runs
after the master service and sends a signal to the master to operate on that
port.

25
docs/swclock.md Normal file
View file

@ -0,0 +1,25 @@
# Software Pseudo RTC
If the configure flag `--enable-swclock` is set, a few service and cron jobs
are enabled that try to help with systems that don't have a hardware real
time clock.
The software pseudo RTC uses a file in `/var/lib` (exact path can be
configured) as backing store for the current date and time.
When booting the system, a service called `swclock` restores the current time
from the file. When performing a reboot or shutdown, a service called
`swclocksave` writes the current time back to the file.
A cron job is enabled that writes the current time to the backing file hourly,
so in case the system momentarily loses power, it loses "only" up to one hour.
The time will drift much worse anyway if the system is powered off (even
intentionally) for a while.
All this is ensures that the system clock is monotonically increasing and only
somewhat behind the actual wall clock time.
To catch up with real time, an additional cron job is enabled that tries to
update the time from an NTP server every four hours. This functionality is
implemented in a small shell script, that is also called from a dhcpcd hook
once a lease is obtained, assuming the DHCP client configure option was set.

7
etc/40-ntpsetdate.in Normal file
View file

@ -0,0 +1,7 @@
case "$reason" in
BOUND*)
@SCRIPTDIR@/setntpdate.sh
;;
*)
;;
esac

View file

@ -1,5 +1,5 @@
helper_SCRIPTS += scripts/devfs.sh scripts/trymount.sh scripts/ifrename.sh
helper_SCRIPTS += scripts/ifcfg.sh scripts/ifdown.sh scripts/modules_load.sh
helper_SCRIPTS += scripts/trymount.sh scripts/ifrename.sh
helper_SCRIPTS += scripts/ifdown.sh scripts/modules_load.sh
helper_SCRIPTS += scripts/setntpdate.sh scripts/overlay.sh
EXTRA_DIST += scripts/trymount.sh scripts/ifdown.sh scripts/setntpdate.sh

View file

@ -1,21 +0,0 @@
#!/bin/sh
mount -t devtmpfs none /dev
[ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
[ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0
[ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
[ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
[ -e /dev/fd ] || ln -snf /proc/self/fd /dev/fd
[ -e /dev/stdin ] || ln -snf /proc/self/fd/0 /dev/stdin
[ -e /dev/stdout ] || ln -snf /proc/self/fd/1 /dev/stdout
[ -e /dev/stderr ] || ln -snf /proc/self/fd/2 /dev/stderr
[ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
mkdir -p /dev/mqueue -m 1777
mkdir -p /dev/pts -m 0755
mkdir -p /dev/shm -m 1777
@SCRIPTDIR@/trymount.sh "/dev/mqueue" "mqueue" "noexec,nosuid,nodev"
@SCRIPTDIR@/trymount.sh "/dev/pts" "devpts" "noexec,nosuid,gid=5,mode=0620"
@SCRIPTDIR@/trymount.sh "/dev/shm" "tmpfs" "noexec,nosuid,nodev,mode=1777"

View file

@ -1,71 +0,0 @@
#!/bin/sh
CFGPATH="@ETCPATH@/netcfg"
[ -d "$CFGPATH" ] || exit 0
# configure interfaces
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`
CFGFILE="$CFGPATH/$IF"
[ -f "$CFGFILE" ] || continue
ip link set dev "$IF" down
while read LINE;
do
trimmed=`echo -- $LINE`
[ ! -z "$trimmed" ] || continue
set $trimmed
case "$1" in
address|addr|ip|ip6|ipv6)
shift
ip address add $@ dev "$IF"
;;
arp|multicast|mtu)
ip link set dev "$IF" $@
;;
offload)
shift
ethtool -K "$IF" $@
;;
*)
;;
esac
done < "$CFGFILE"
done
# configure static routs
if [ -f "$CFGPATH/routes" ]; then
while read LINE;
do
trimmed=`echo -- $LINE`
[ ! -z "$trimmed" ] || continue
set $trimmed
case "$1" in
route)
shift
ip route add $@
;;
rule)
shift
ip rule add $@
;;
*)
;;
esac
done < "$CFGFILE"
fi
# activate interfaces
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`
[ ! -f "$CFGPATH/$IF" ] || ip link set dev "$IF" up
done

View file

@ -1,6 +1,6 @@
#!/bin/sh
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`

View file

@ -7,7 +7,7 @@ TMPPATH="/tmp/ifrename"
mkdir -p "$TMPPATH"
for IFPATH in /sys/class/net/*; do
[ "$IFPATH" == "/sys/class/net/lo" ] && continue
[ "$IFPATH" = "/sys/class/net/lo" ] && continue
IF=`basename $IFPATH`
MAC=`cat $IFPATH/address`

View file

@ -5,17 +5,7 @@ upper=/cfg/overlay/${1}
work=/cfg/overlay/${1}_work
target=${2}
if [ ! -d "$target" ]; then
exit
fi
if [ -d "$lower" ]; then
if [ -d "$upper" ]; then
mkdir -p "$work"
mount -t overlay overlay \
-olowerdir=${lower},upperdir=${upper},workdir=${work} \
${target}
else
mount --bind "$lower" "$target"
fi
fi
mkdir -p "$work" "$upper"
mount -t overlay overlay \
-olowerdir=${lower},upperdir=${upper},workdir=${work} \
"$target"

View file

@ -15,9 +15,9 @@ resolve() {
if [ -x "$(command -v drill)" ]; then
if [ -z "$server" ]; then
drill "$domain" | grep "^${domain}." | cut -d$'\t' -f5
drill "$domain" | grep "^$domain." | cut -d$'\t' -f5
else
drill "@$server" "$domain" | grep "^${domain}." |\
drill "@$server" "$domain" | grep "^$domain." |\
cut -d$'\t' -f5
fi
return $?

View file

@ -4,20 +4,24 @@ init_DATA += services/sysctl services/hwclock services/sysinit
init_DATA += services/sigterm services/sync services/devfs
init_DATA += services/sysfs services/procfs services/tmpfs
init_DATA += services/vfs services/ifrename services/ifcfg
init_DATA += services/dhcpcd services/dhcpcdmaster services/unbound
init_DATA += services/dnsmasq services/ifdown services/modules
init_DATA += services/network services/hostapd services/swclock
init_DATA += services/swclocksave services/nft services/sigkill
init_DATA += services/unbound services/dnsmasq services/ifdown services/modules
init_DATA += services/network services/hostapd services/nft services/sigkill
init_DATA += services/sshd services/sshd_keygen services/consolefont
init_DATA += services/nginx services/usyslogd services/klogd
init_DATA += services/swclocksave.gcron services/gcrond
init_DATA += services/mountusr services/ntpsetdate.gcron
init_DATA += services/gcrond services/mountusr services/unmount
init_DATA += services/tmpfsrun services/tmpfsvar
if DHCPCLIENT
init_DATA += services/dhcpcd services/dhcpcdmaster
endif
if SWCLOCK
init_DATA += services/swclock services/swclocksave
endif
EXTRA_DIST += services/sysinit services/vfs services/agetty services/hostname
EXTRA_DIST += services/hwclock services/loopback services/klogd
EXTRA_DIST += services/sync services/sysctl services/tmpfs
EXTRA_DIST += services/dhcpcd services/dhcpcdmaster services/unbound
EXTRA_DIST += services/dhcpcdmaster services/unbound
EXTRA_DIST += services/usyslogd services/dnsmasq services/network
EXTRA_DIST += services/consolefont services/gcrond services/nginx
EXTRA_DIST += services/tmpfsrun
EXTRA_DIST += services/tmpfsrun services/unmount

View file

@ -3,4 +3,20 @@ type wait
target boot
after procfs sysfs
before vfs
exec "@SCRIPTDIR@/devfs.sh"
exec {
mount -t devtmpfs none /dev
ln -snf /proc/self/fd /dev/fd
ln -snf /proc/self/fd/0 /dev/stdin
ln -snf /proc/self/fd/1 /dev/stdout
ln -snf /proc/self/fd/2 /dev/stderr
ln -snf /proc/kcore /dev/core
mkdir -p /dev/mqueue -m 1777
mkdir -p /dev/pts -m 0755
mkdir -p /dev/shm -m 1777
"@SCRIPTDIR@/trymount.sh" /dev/mqueue mqueue noexec,nosuid,nodev
"@SCRIPTDIR@/trymount.sh" /dev/pts devpts noexec,nosuid,gid=5,mode=0620
"@SCRIPTDIR@/trymount.sh" /dev/shm tmpfs noexec,nosuid,nodev,mode=1777
}

View file

@ -4,4 +4,7 @@ target boot
after dhcpcdmaster network
tty /dev/null
exec dhcpcd -n %0
exec {
"@SCRIPTDIR@/waitfile" 5 200 /run/dhcpcd.sock /run/dhcpcd.pid
dhcpcd -n %0
}

View file

@ -1,10 +1,10 @@
description "DHCP client - master service"
type wait
type respawn limit 5
target boot
after network
tty /dev/null
exec {
mkdir -p /var/db/dhcpcd
dhcpcd --inactive
dhcpcd --inactive --nobackground
}

View file

@ -3,5 +3,4 @@ type wait
target boot
after sysinit ifrename
before network
exec "@SCRIPTDIR@/ifcfg.sh"
exec ip -force -batch "@ETCPATH@/netcfg/static"

View file

@ -2,6 +2,6 @@ description "stop all network interfaces"
type wait
target %0
after sigkill sigterm
before sync
before sync unmount
exec "@SCRIPTDIR@/ifdown.sh"

View file

@ -1,6 +1,6 @@
description "start nginx web server"
type once
description "nginx web server"
type respawn limit 10
target boot
after network
tty /dev/null
exec nginx
exec nginx -g "daemon off;"

View file

@ -1,7 +0,0 @@
hour */4
minute 5
dayofmonth *
dayofweek *
month *
tty /dev/null
exec "@SCRIPTDIR@/setntpdate.sh"

View file

@ -1,3 +0,0 @@
interval hourly
tty truncate @STATEFILESPATH@/swclock
exec date --utc +%%m%%d%%H%%M%%Y.%%S

9
services/unmount Normal file
View file

@ -0,0 +1,9 @@
description unmount overlay filesystem
type wait
target %0
after sigkill
before sync
exec {
umount -nli /var/lib /usr /etc
umount -nli /cfg/overlay
}