From: Michael Tremer Date: Sun, 27 May 2012 13:57:09 +0000 (+0000) Subject: Reduce startup time by letting systemd create our files in /run. X-Git-Tag: 004~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5529407b86abd015d31e3eef3ff40f5e31e6b7ab;p=network.git Reduce startup time by letting systemd create our files in /run. --- diff --git a/Makefile b/Makefile index 84286cbd..a7cbeae9 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ libdir=$(prefix)/lib sysconfdir=/etc localstatedir=/var systemdunitdir=$(prefix)/lib/systemd/system +tmpfilesdir=$(prefix)/lib/tmpfiles.d # File to store the version number in. VERSION_FILE = $(DESTDIR)$(libdir)/network/version @@ -24,6 +25,7 @@ install: -mkdir -pv $(DESTDIR)$(localstatedir)/log/network -mkdir -pv $(DESTDIR)$(sbindir) -mkdir -pv $(DESTDIR)$(systemdunitdir) + -mkdir -pv $(DESTDIR)$(tmpfilesdir) install -m 755 -v network $(DESTDIR)$(sbindir) @@ -32,6 +34,7 @@ install: cp -rfv udev/* $(DESTDIR)$(libdir)/udev cp -rfv network-* $(DESTDIR)$(libdir)/network/ cp -vf systemd/*.service $(DESTDIR)$(systemdunitdir) + cp -vf network.tmpfiles $(DESTDIR)$(tmpfilesdir)/network.conf # Install bridge-stp. install -m 755 bridge-stp $(DESTDIR)$(sbindir)/ diff --git a/functions.aiccu b/functions.aiccu index 5a49eddc..5c4d38bb 100644 --- a/functions.aiccu +++ b/functions.aiccu @@ -19,13 +19,6 @@ # # ############################################################################### -function aiccu_init() { - log INFO "Initializing aiccu." - mkdir -p $(aiccu_config_dir) -} - -init_register aiccu_init - function aiccu_config_dir() { local device=${1} diff --git a/functions.ppp b/functions.ppp index ddc68f2e..78b967e4 100644 --- a/functions.ppp +++ b/functions.ppp @@ -19,12 +19,6 @@ # # ############################################################################### -function ppp_init() { - mkdir -p /var/run/ppp 2>/dev/null -} - -init_register ppp_init - function ppp_common_ip_pre_up() { local zone=${1} shift diff --git a/functions.wireless b/functions.wireless index 6353d0d7..2cd19c57 100644 --- a/functions.wireless +++ b/functions.wireless @@ -123,12 +123,6 @@ function wireless_set_channel() { iw dev ${device} set channel ${channel} $@ } -function hostapd_init() { - mkdir -p $(hostapd_config_dir) -} - -init_register hostapd_init - function hostapd_config_dir() { local device=${1} diff --git a/network.tmpfiles b/network.tmpfiles new file mode 100644 index 00000000..9eb4380b --- /dev/null +++ b/network.tmpfiles @@ -0,0 +1,9 @@ +# Create the runtime directory for network. +# This will hold temporary configuration files, +# PID files and much more. +d /run/network 0755 root root - +d /run/network/aiccu 0755 root root - +d /run/network/hostapd 0755 root root - + +# Point-to-point protocol daemon +d /run/ppp 0755 root root -