diff options
| author | Jonathan Bauer | 2014-01-30 11:08:31 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2014-01-30 11:08:31 +0100 |
| commit | 6a650df8c4ec834c03a51604942e32ec9c5741e7 (patch) | |
| tree | e54eb007b92269e6c4872770e62ef398ac347a8e | |
| parent | [rfs-s31] append host info from dhcp instead of creating the file (diff) | |
| parent | [systemd] Clean up build file (diff) | |
| download | tm-scripts-6a650df8c4ec834c03a51604942e32ec9c5741e7.tar.gz tm-scripts-6a650df8c4ec834c03a51604942e32ec9c5741e7.tar.xz tm-scripts-6a650df8c4ec834c03a51604942e32ec9c5741e7.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Conflicts:
remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger
25 files changed, 102 insertions, 81 deletions
diff --git a/remote/modules/dhcpc-busybox/data/etc/systemd/system/dhcpc@.service b/remote/modules/dhcpc-busybox/data/etc/systemd/system/dhcpc@.service new file mode 120000 index 00000000..a2e7487d --- /dev/null +++ b/remote/modules/dhcpc-busybox/data/etc/systemd/system/dhcpc@.service @@ -0,0 +1 @@ +udhcpc@.service
\ No newline at end of file diff --git a/remote/modules/dhcpc-busybox/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service b/remote/modules/dhcpc-busybox/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service deleted file mode 120000 index dff66b14..00000000 --- a/remote/modules/dhcpc-busybox/data/etc/systemd/system/sysinit.target.wants/udhcpc@br0.service +++ /dev/null @@ -1 +0,0 @@ -../udhcpc@.service
\ No newline at end of file diff --git a/remote/modules/dhcpc-busybox/data/etc/systemd/system/udhcpc@.service b/remote/modules/dhcpc-busybox/data/etc/systemd/system/udhcpc@.service index 6547de5b..9226f00c 100644 --- a/remote/modules/dhcpc-busybox/data/etc/systemd/system/udhcpc@.service +++ b/remote/modules/dhcpc-busybox/data/etc/systemd/system/udhcpc@.service @@ -1,7 +1,6 @@ [Unit] -Description=DHCP Client -DefaultDependencies=no -Before=sysinit.target +Description=DHCP Client for %i +After=systemd-tmpfiles-setup.service [Service] Type=forking @@ -9,5 +8,3 @@ PIDFile=/run/udhcpc/udhcpc.%I.pid ExecStart=/opt/openslx/scripts/systemd-udhcpc++ %I ExecStopPost=/bin/rm /run/udhcpc/udhcpc.%I.pid -[Install] -WantedBy=multi-user.target diff --git a/remote/modules/dhcpc-busybox/data/etc/tmpfiles.d/udhcpc.conf b/remote/modules/dhcpc-busybox/data/etc/tmpfiles.d/udhcpc.conf new file mode 100644 index 00000000..3f83df3b --- /dev/null +++ b/remote/modules/dhcpc-busybox/data/etc/tmpfiles.d/udhcpc.conf @@ -0,0 +1 @@ +D /run/udhcpc 0755 root root diff --git a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx index 546750b9..e43afb33 100755 --- a/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx +++ b/remote/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx @@ -20,12 +20,12 @@ . /opt/openslx/config RESOLV_CONF="/etc/resolv.conf" -THIS_RESOLV="/run/dhcpc/${interface}.resolv" +THIS_RESOLV="/run/network/${interface}.resolv" rebuild_resolv_conf () { # Maybe make this smarter some time, if anyone is using client's that are on multiple networks at once etc... # This is a little braindead but should work most of the time - sort -u /run/dhcpc/*.resolv > "$RESOLV_CONF" 2> /dev/null + sort -u /run/network/*.resolv > "$RESOLV_CONF" 2> /dev/null } escape_search() { @@ -96,7 +96,7 @@ case "$1" in sed -i "s/^\(SLX_PXE_CLIENT_IP=\).*$/\1'$ip'/" /opt/openslx/config # Only if network is not ready yet - if [ ! -e "/run/dhcpc/network-ready" ]; then + if [ ! -e "/run/network/network-ready" ]; then # Update hostname if [ -z "$dns_host" ]; then # fallback to what the dhcp told us @@ -130,7 +130,7 @@ case "$1" in fi # Update /etc/issue for proper spacing /opt/openslx/scripts/openslx-create_issue - touch "/run/dhcpc/network-ready" + touch "/run/network/network-ready" # Mark network target as reached systemctl start network.target & fi # end "network not ready yet" @@ -158,16 +158,16 @@ case "$1" in sed -i -r '/^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\s*$/d' /etc/hosts # "dns ready" target - if [ -n "$dns" ] && [ ! -e "/run/dhcpc/dns-ready" ]; then - touch "/run/dhcpc/dns-ready" + if [ -n "$dns" ] && [ ! -e "/run/network/dns-ready" ]; then + touch "/run/network/dns-ready" # Write to openslx-config echo "# Config written by openslx-dhcp-script (2)" >> /opt/openslx/config echo "SLX_DNS='$dns'" >> /opt/openslx/config systemctl start network-dns.target & fi # "default route exists" target - if [ -n "$router" ] && [ ! -e "/run/dhcpc/routing-ready" ]; then - touch "/run/dhcpc/routing-ready" + if [ -n "$router" ] && [ ! -e "/run/network/gateway-ready" ]; then + touch "/run/network/gateway-ready" # Write to openslx-config echo "# Config written by openslx-dhcp-script (3)" >> /opt/openslx/config echo "SLX_DNS='$dns'" >> /opt/openslx/config 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/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 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. 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/" diff --git a/remote/rootfs/rootfs-stage31/data/inc/setup_network b/remote/rootfs/rootfs-stage31/data/inc/setup_network index ed29050f..9e52cfaa 100755 --- a/remote/rootfs/rootfs-stage31/data/inc/setup_network +++ b/remote/rootfs/rootfs-stage31/data/inc/setup_network @@ -58,6 +58,8 @@ for LINE in $IP_OUT; do else NOIPYET="yes" fi + # Ignore this device later on when systemd handles network interfaces (see hacked 99-systemd.rules in systemd data dir) + echo "SUBSYSTEM==\"net\", ACTION==\"add\", KERNEL==\"eth*\", ATTR{address}==\"$IFMAC\", TAG+=\"openslxignore\"" >> "${FUTURE_ROOT}/etc/udev/rules.d/01-ignore-boot-interface.rules" fi # youdev echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", ATTR{address}==\"$IFMAC\", ATTR{dev_id}==\"0x0\", ATTR{type}==\"1\", KERNEL==\"eth*\", NAME=\"$IFACE\"" >> "${FUTURE_ROOT}/etc/udev/rules.d/70-net-boot-nic-name.rules" diff --git a/remote/rootfs/rootfs-stage31/data/inc/setup_stage32 b/remote/rootfs/rootfs-stage31/data/inc/setup_stage32 index f0380ece..57ad09e1 100755 --- a/remote/rootfs/rootfs-stage31/data/inc/setup_stage32 +++ b/remote/rootfs/rootfs-stage31/data/inc/setup_stage32 @@ -45,6 +45,7 @@ FUTURE_ROOT="/mnt" # Move network stuff cp /etc/hostname /etc/hosts /etc/resolv.conf "${FUTURE_ROOT}/etc/" +[ -s "/run/config" ] && cat "/run/config" >> "${FUTURE_ROOT}/opt/openslx/config" # "Delete" addon hook-script in aufs view touch "/mnt/opt/openslx/uniontmp/.wh.addon-init" diff --git a/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger b/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger index 1d4fff7a..50ace72e 100755 --- a/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger +++ b/remote/rootfs/rootfs-stage31/data/inc/udhcpc-trigger @@ -45,7 +45,11 @@ fi rm -f -- "/etc/resolv.conf" # DNS/domain? -[ -n "$dns" ] && echo "..got DNS.." +if [ -n "$dns" ]; then + echo "..got DNS.." + echo "# From DHCP in stage 3.1" >> "/run/config" + echo "SLX_DNS='$dns'" >> "/run/config" +fi for serv in $dns; do echo "nameserver $serv" >> "/etc/resolv.conf" done @@ -75,6 +79,11 @@ if [ -n "$hostname" ]; then echo "..setting hostname $hostname (fqdn: $fqdn).." echo "$fqdn" > "/proc/sys/kernel/hostname" echo "$fqdn" > "/etc/hostname" +<<<<<<< HEAD echo "$ip $fqdn $hostname" >> "/etc/hosts" +======= + echo "$ip $fqdn $hostname" > "/etc/hosts" + echo "SLX_HOSTNAME='$hostname'" >> "/run/config" +>>>>>>> 7d9fdc9dc8069ddb9f55a527119cc86894f2ed3b fi diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init index ac058591..250767e3 100755 --- a/remote/rootfs/rootfs-stage31/data/init +++ b/remote/rootfs/rootfs-stage31/data/init @@ -41,13 +41,7 @@ setup_gfx () { #echo "Trying to load module $DRM" modprobe "$DRM" 2>/dev/null done - # start plymouth if activated - #if [ $DEBUG -lt 1 ]; then - # echo "Starting plymouth..." - # # link the theming directory from the config to the current root - # ln -sf "${FUTURE_ROOT}/usr/share" /usr/share - # lymouthd --kernel-command-line="splash" --tty=/dev/tty7 && plymouth show-splash - #fi + # start some kind of splash screen if activated } setup_gfx & @@ -57,44 +51,41 @@ mdev -s # read kernel command line for debugging switch DEBUG=0 -read KCL < /proc/cmdline -export KCL +read KCL < "/proc/cmdline" for opts in ${KCL}; do case "${opts}" in debug=*) DEBUG=${opts#debug=} ;; ip=*) # process IP info - export IPINFO=${opts#ip=} ;; + IPINFO=${opts#ip=} ;; nfs=*) - export NFS=${opts#nfs=} - export NFSPATH=${nfs#*:} - export NFSSERVER=${nfs%:/*} + NFS=${opts#nfs=} + NFSPATH=${NFS#*:} + NFSSERVER=${NFS%:/*} ;; BOOTIF=*) - export MAC="$( echo "$opts" | cut -b 11- | tr '-' ':' | tr '[A-Z]' '[a-z]' )" ;; # make mac lowercase for udev (see setup_network) + MAC="$( echo "$opts" | cut -b 11- | tr '-' ':' | tr '[A-Z]' '[a-z]' )" ;; # make mac lowercase for udev (see setup_network) esac done # suppress kernel output if DEBUG is not set [ $DEBUG -ge 1 ] && echo "0" > /proc/sys/kernel/printk || echo "4 4 1 7" >/proc/sys/kernel/printk -[ $DEBUG -ge 5 ] && drop_shell "Requested Debug Shell: before network." +[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell: before network." . "/inc/setup_network" || drop_shell "Error setting up network" -[ $DEBUG -ge 4 ] && drop_shell "Requested Debug Shell: after network/before configuring." +[ $DEBUG -ge 3 ] && drop_shell "Requested Debug Shell: after network/before configuring." . "/inc/activate_sysconfig" || drop_shell "Could not source /bin/activate_sysconfig" -[ $DEBUG -ge 3 ] && drop_shell "Requested Debug Shell: after network/before configuring." - [ $DEBUG -ge 2 ] && drop_shell "Requested Debug Shell: after configuration/before stage32." . "/inc/setup_stage32" || drop_shell "Problem setting up stage3.2" # copy files needed for stage3.2 to FUTURE_ROOT -[ $DEBUG -ge 1 ] && echo "Copying busybox etc. to stage32..." +echo "Copying busybox etc. to stage32..." tar -cp "/bin" "/sbin" "/usr/bin" "/usr/sbin" "/etc/functions.inc" | tar -xp -C "${FUTURE_ROOT}/opt/openslx/" # set the SLX_ROOT_PASS if given in config @@ -105,17 +96,14 @@ fi # one last debug shell if activated [ $DEBUG -ge 1 ] && drop_shell "Requested Debug Shell: before switch_root." -# tell plymouth about the immediate rootfs switch -#[ $DEBUG -lt 1 ] && plymouth update-root-fs --new-root-dir=/mnt - # unmount filesystems for mnt in proc sys run ; do - busybox umount -n "$mnt" 2>/dev/null + busybox umount -f -l "/$mnt" 2>/dev/null done echo "Switching root...." # Prepare environment (HOME is needed as a hack for nss_ldap with ssl and no caching) -unset BOOT_IMAGE initrd KCL ip slxbase slxsrv IPINFO vga ip MAC BOOTIF +unset BOOT_IMAGE initrd KCL ip slxbase slxsrv IPINFO vga ip MAC BOOTIF DEBUG export HOME=/ export init="/usr/lib/systemd/systemd" export recovery= diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/early-network-triggers.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/early-network-triggers.service new file mode 100644 index 00000000..4713dae1 --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/early-network-triggers.service @@ -0,0 +1,12 @@ +# This will trigger network.target etc. at an early point, +# if network setup happened in stage31 (dhcp...) +[Unit] +Description=Trigger network targets early +DefaultDependencies=no +Wants=systemd-tmpfiles-setup.service +Before=sysinit.target +After=systemd-tmpfiles-setup.service + +[Service] +Type=oneshot +ExecStart=/opt/openslx/scripts/systemd-early_network_triggers diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-dns.target b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-dns.target index c0b7793b..bc12cd1b 100644 --- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-dns.target +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-dns.target @@ -1,4 +1,4 @@ [Unit] - Description=DNS Server available +ConditionPathExists=/run/network/dns-ready diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-gateway.target b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-gateway.target index cfeb719c..770eb697 100644 --- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-gateway.target +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/network-gateway.target @@ -1,3 +1,4 @@ [Unit] - Description=Default route configured +ConditionPathExists=/run/network/gateway-ready + diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/ntpdate.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/ntpdate.service index a48375d0..ebaa9afb 100644 --- a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/ntpdate.service +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/ntpdate.service @@ -2,7 +2,6 @@ Description=Update date from local time server After=network.target Requires=network.target -ConditionPathExists=/run/udhcpc/network-ready [Service] Type=oneshot diff --git a/remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/early-network-triggers.service b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/early-network-triggers.service new file mode 120000 index 00000000..8aec0a6d --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/etc/systemd/system/sysinit.target.wants/early-network-triggers.service @@ -0,0 +1 @@ +../early-network-triggers.service
\ No newline at end of file diff --git a/remote/rootfs/rootfs-stage32/data/etc/tmpfiles.d/network.conf b/remote/rootfs/rootfs-stage32/data/etc/tmpfiles.d/network.conf new file mode 100644 index 00000000..dd67e785 --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/etc/tmpfiles.d/network.conf @@ -0,0 +1 @@ +D /run/network 0755 root root diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-early_network_triggers b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-early_network_triggers new file mode 100755 index 00000000..dc639535 --- /dev/null +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-early_network_triggers @@ -0,0 +1,26 @@ +#!/bin/ash + +# This script will trigger several network targets if +# applicable at an early point. +# This happens if dhcp/network setup was successful in stage31 + +# Main interface +BRIDGE="br0" + +if [ ! -e "/sys/class/net/${BRIDGE}/operstate" -o "x$(cat "/sys/class/net/${BRIDGE}/operstate")" == "xup" ] && [ -e "/opt/openslx/uniontmp/etc/hostname" -o -e "/opt/openslx/uniontmp/etc/resolv.conf" ]; then + touch "/run/network/network-ready" + systemctl start network.target & +fi + +if [ -s "/etc/resolv.conf" ] && grep -q "^nameserver" "/etc/resolv.conf"; then + touch "/run/network/dns-ready" + systemctl start network-dns.target & +fi + +if route -n | grep -q -E '^0\.0\.0\.0.*U.*G'; then + touch "/run/network/gateway-ready" + systemctl start network-gateway.target & +fi + +exit 0 + diff --git a/server/blacklists/desktop-sessions/lightdm-runtime-cache b/server/blacklists/desktop-sessions/lightdm-runtime-cache new file mode 100644 index 00000000..56aa4cc9 --- /dev/null +++ b/server/blacklists/desktop-sessions/lightdm-runtime-cache @@ -0,0 +1,4 @@ +- /var/lib/lightdm/** ++ /var/lib/lightdm/**/ ++ /var/lib/lightdm/.fontconfig/** + diff --git a/server/blacklists/essential/status-files b/server/blacklists/essential/status-files new file mode 100644 index 00000000..ed81d019 --- /dev/null +++ b/server/blacklists/essential/status-files @@ -0,0 +1 @@ +- /var/lib/logrotate/status diff --git a/server/blacklists/persistent-only/ubuntu-update-notifier b/server/blacklists/persistent-only/ubuntu-update-notifier new file mode 100644 index 00000000..fa51a26d --- /dev/null +++ b/server/blacklists/persistent-only/ubuntu-update-notifier @@ -0,0 +1,5 @@ ++ /var/lib/ubuntu-release-upgrader/**/ +- /var/lib/ubuntu-release-upgrader/** ++ /var/lib/update-notifier/**/ +- /var/lib/update-notifier/** + |
