summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortorben2018-09-07 11:49:56 +0200
committertorben2018-09-07 11:49:56 +0200
commit2b9b30fa55be603194015cf0e67cf264e05f0095 (patch)
tree3d83f7df3caffdfa92e88a2afe7df929042327fb
parentIncrease wait for online target timeout. (diff)
downloadsystemd-init-2b9b30fa55be603194015cf0e67cf264e05f0095.tar.gz
systemd-init-2b9b30fa55be603194015cf0e67cf264e05f0095.tar.xz
systemd-init-2b9b30fa55be603194015cf0e67cf264e05f0095.zip
fix (reintegrate macchanger)
-rwxr-xr-xmodules.d/dnbd-root-filesystem/hooks/update-boot-files.sh2
-rwxr-xr-xmodules.d/systemd-networkd-ext/hooks/prepare-network-service-in-newroot.sh14
-rwxr-xr-xmodules.d/systemd-networkd-ext/module-setup.sh10
-rw-r--r--modules.d/systemd-networkd-ext/restart-wireless-daemon.service2
4 files changed, 21 insertions, 7 deletions
diff --git a/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh b/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh
index 3a3e9725..c307451e 100755
--- a/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh
+++ b/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh
@@ -343,8 +343,8 @@ EOF
then
umount /mnt
# NOTE: This is needed to retrieve a new ip after kexec!
- systemctl stop wpa_supplicant@wireless
systemctl stop systemd-networkd
+ systemctl stop wpa_supplicant@wireless
kexec -e
else
bl.logging.warn \
diff --git a/modules.d/systemd-networkd-ext/hooks/prepare-network-service-in-newroot.sh b/modules.d/systemd-networkd-ext/hooks/prepare-network-service-in-newroot.sh
index 78644407..6857ef6e 100755
--- a/modules.d/systemd-networkd-ext/hooks/prepare-network-service-in-newroot.sh
+++ b/modules.d/systemd-networkd-ext/hooks/prepare-network-service-in-newroot.sh
@@ -61,11 +61,14 @@ if $SLX_ONLINE; then
bl.logging.info \
Link service "$service_file_path" to \
"$NEWROOT_SYSINIT_TARGET_DIR/$service_name".
- ln \
- --force \
- --symbolic \
- "$service_file_path" \
- "$NEWROOT_SYSINIT_TARGET_DIR/$service_name"
+ # TODO test
+ if [[ "$service_name" != 'systemd-networkd.service' ]]; then
+ ln \
+ --force \
+ --symbolic \
+ "$service_file_path" \
+ "$NEWROOT_SYSINIT_TARGET_DIR/$service_name"
+ fi
done
if [[ "$SLX_WIRELESS_MAC" != false ]]; then
service_name=wpa_supplicant@wireless.service
@@ -100,6 +103,7 @@ if $SLX_ONLINE; then
cat << EOF >"$NEWROOT/root/.bash_profile"
wget --output-document - http://10.21.9.111/BOOTED
if [ ! -f /tmp/wireless-daemon-restarted ]; then
+ systemctl start restart-wireless-daemon.service
touch /tmp/wireless-daemon-restarted
fi
$(cat "$NEWROOT/root/.bash_profile")
diff --git a/modules.d/systemd-networkd-ext/module-setup.sh b/modules.d/systemd-networkd-ext/module-setup.sh
index 050d3307..b1222aa4 100755
--- a/modules.d/systemd-networkd-ext/module-setup.sh
+++ b/modules.d/systemd-networkd-ext/module-setup.sh
@@ -184,6 +184,10 @@ install() {
$systemdsystemunitdir/systemd-networkd.socket \
$systemdsystemunitdir/systemd-resolved.service \
ip \
+ macchanger \
+ usr/share/info/macchanger.info.gz \
+ usr/share/macchanger/OUI.list \
+ usr/share/macchanger/wireless.list \
nice \
sync
# wpa_supplicant version:
@@ -238,6 +242,12 @@ install() {
do
systemctl --root "$initdir" enable "$service_name"
done
+ # TODO check
+ sed \
+ --in-place \
+ --regexp-extended \
+ 's:^(\[Unit\]):\1\nIgnoreOnIsolate=true:' \
+ "$initdir/$systemdsystemunitdir/systemd-networkd.service"
# NOTE: We have to install "systemd-resolved.service" by hand to activate
# it on network target (and not on "multi-user-target.wants" as specified
# in the service file's install section).
diff --git a/modules.d/systemd-networkd-ext/restart-wireless-daemon.service b/modules.d/systemd-networkd-ext/restart-wireless-daemon.service
index d8c248d8..e4c803dc 100644
--- a/modules.d/systemd-networkd-ext/restart-wireless-daemon.service
+++ b/modules.d/systemd-networkd-ext/restart-wireless-daemon.service
@@ -16,8 +16,8 @@ ExecStartPre=-/run/initramfs/usr/bin/sync
#ExecStartPre=-/run/initramfs/usr/bin/sleep 20
#ExecStart=/usr/bin/systemctl start iwd
ExecStart=/usr/bin/systemctl start wpa_supplicant@wireless.service
+#ExecStartPre=/usr/bin/systemctl start systemd-networkd
# Restarts dhcp lease to retrieve a valid unique ip.
-ExecStartPost=/usr/bin/systemctl restart systemd-netword
RemainAfterExit=true
StandardError=null
StandardOutput=null