From b77ffba65617c4001e85a31dc9673d0abe481fb8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 29 Jan 2014 21:10:04 +0100 Subject: Trigger network target as soon as possible if network/dhcp has been done in stage31 --- .../data/etc/systemd/system/network-interface@.service | 4 ++-- .../modules/systemd/data/etc/systemd/system/network.target | 13 ------------- .../systemd/data/usr/lib/systemd/system/network.target | 3 +++ .../systemd/data/usr/lib/udev/rules.d/99-systemd.rules | 7 ++++--- 4 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 remote/modules/systemd/data/etc/systemd/system/network.target (limited to 'remote/modules/systemd') diff --git a/remote/modules/systemd/data/etc/systemd/system/network-interface@.service b/remote/modules/systemd/data/etc/systemd/system/network-interface@.service index 73cc6239..ea9cc56e 100644 --- a/remote/modules/systemd/data/etc/systemd/system/network-interface@.service +++ b/remote/modules/systemd/data/etc/systemd/system/network-interface@.service @@ -1,7 +1,7 @@ [Unit] Description=Brings interface %i up -Wants=udhcpc@%i.service -Before=udhcpc@%i.service +Wants=dhcpc@%i.service +Before=dhcpc@%i.service [Service] Type=simple diff --git a/remote/modules/systemd/data/etc/systemd/system/network.target b/remote/modules/systemd/data/etc/systemd/system/network.target deleted file mode 100644 index 0bc2a410..00000000 --- a/remote/modules/systemd/data/etc/systemd/system/network.target +++ /dev/null @@ -1,13 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -[Unit] -Description=Network -Documentation=man:systemd.special(7) -Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget -ConditionPathExists=/run/udhcpc/network-ready - diff --git a/remote/modules/systemd/data/usr/lib/systemd/system/network.target b/remote/modules/systemd/data/usr/lib/systemd/system/network.target index 65fc64b0..4186c088 100644 --- a/remote/modules/systemd/data/usr/lib/systemd/system/network.target +++ b/remote/modules/systemd/data/usr/lib/systemd/system/network.target @@ -9,3 +9,6 @@ Description=Network Documentation=man:systemd.special(7) Documentation=http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget +DefaultDependencies=no +ConditionPathExists=/run/network/network-ready + diff --git a/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules b/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules index c148de7a..99cdf676 100644 --- a/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules +++ b/remote/modules/systemd/data/usr/lib/udev/rules.d/99-systemd.rules @@ -31,7 +31,9 @@ SUBSYSTEM=="block", KERNEL!="ram*|loop*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_T # # http://git.kernel.org/?p=linux/hotplug/udev.git;a=blob;f=libudev/libudev-enumerate.c;h=da831449dcaf5e936a14409e8e68ab12d30a98e2;hb=HEAD#l742 -#SUBSYSTEM=="net", KERNEL=="eth*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service" +SUBSYSTEM=="net", KERNEL=="eth*", TAG=="openslxignore", GOTO="systemd_end" + +SUBSYSTEM=="net", KERNEL=="br0|eth*", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/net/devices/$name", ENV{SYSTEMD_WANTS}="network-interface@$name.service" SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}="/sys/subsystem/bluetooth/devices/%k" SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}="bluetooth.target" @@ -43,8 +45,7 @@ SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.tar SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}="printer.target" # Apply sysctl variables to network devices (and only to those) as they appear. - -#SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name" +SUBSYSTEM=="net", KERNEL=="eth*", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/ipv4/conf/$name --prefix=/proc/sys/net/ipv4/neigh/$name --prefix=/proc/sys/net/ipv6/conf/$name --prefix=/proc/sys/net/ipv6/neigh/$name" # Asynchronously mount file systems implemented by these modules as # soon as they are loaded. -- cgit v1.2.3-55-g7522 From 8ebb2c22a29c6c61b31a2fe58a02c62a28c7b49e Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 29 Jan 2014 21:11:23 +0100 Subject: [systemd] Don't wait more than 3 seconds on udev settle --- .../systemd/data/usr/lib/systemd/system/systemd-udev-settle.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote/modules/systemd') diff --git a/remote/modules/systemd/data/usr/lib/systemd/system/systemd-udev-settle.service b/remote/modules/systemd/data/usr/lib/systemd/system/systemd-udev-settle.service index b7bd2336..65431092 100644 --- a/remote/modules/systemd/data/usr/lib/systemd/system/systemd-udev-settle.service +++ b/remote/modules/systemd/data/usr/lib/systemd/system/systemd-udev-settle.service @@ -22,4 +22,4 @@ ConditionCapability=CAP_MKNOD Type=oneshot TimeoutSec=180 RemainAfterExit=yes -ExecStart=/usr/bin/udevadm settle +ExecStart=/usr/bin/udevadm settle --timeout=3 -- cgit v1.2.3-55-g7522 From 7d9fdc9dc8069ddb9f55a527119cc86894f2ed3b Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 30 Jan 2014 02:11:41 +0100 Subject: [systemd] Clean up build file --- remote/modules/systemd/systemd.build | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'remote/modules/systemd') diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build index 7f2f0eb6..95576548 100644 --- a/remote/modules/systemd/systemd.build +++ b/remote/modules/systemd/systemd.build @@ -53,33 +53,15 @@ build () { export LDFLAGS="$OLDLDFLAGS" export CPPFLAGS="$OLDCPPFLAGS" export PKG_CONFIG_PATH="$OLDPKG_CONFIG_PATH" - LD_LIBRARY_PATH="$OLDLD_LIBRARY_PATH" - - # Delete unneeded services - #pinfo "Deleting unneeded services" - #local SERVICE= - #local OTHER= - #for SERVICE in $REQUIRED_DISABLED_SERVICES; do - # find "${MODULE_BUILD_DIR}" -name "$SERVICE" -exec rm -r {} \; - # for OTHER in $(grep -l -r "$SERVICE" "$MODULE_BUILD_DIR/usr/lib/systemd/system"); do - # sed -i -r "s#\s*$SERVICE\s*# #g" "$OTHER" - # done - #done + export LD_LIBRARY_PATH="$OLDLD_LIBRARY_PATH" } post_copy() { - # dont clear systemd log at startup - sed -i "s/TTYVTDisallocate=yes/TTYVTDisallocate=no/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service" - #old agetty version doesn't support --noclear option in getty service if [ "x$(dpkg -s util-linux | grep Version: | cut -d' ' -f2)" == "x2.19.1-2ubuntu3" ]; then - sed -i.bak "s/ExecStart=-\/sbin\/agetty --noclear %I 38400 linux/ExecStart=-\/sbin\/agetty %I 38400 linux/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service" + sed -i "s/ExecStart=-\/sbin\/agetty --noclear %I 38400 linux/ExecStart=-\/sbin\/agetty %I 38400 linux/g" "${TARGET_BUILD_DIR}/usr/lib/systemd/system/getty@.service" fi - # add nfs to modules-load list - # TODO: is this still needed? - echo "nfs" > "${TARGET_BUILD_DIR}/etc/modules-load.d/nfs.conf" - # add pam_systemd.so to pam modules directory if [ -e "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" ]; then cp "${MODULE_BUILD_DIR}/usr/lib/security/pam_systemd.so" "${TARGET_BUILD_DIR}/lib/security/" -- cgit v1.2.3-55-g7522