From 4ee3022454e2e916452f6255466d757592c4026b Mon Sep 17 00:00:00 2001 From: torben Date: Mon, 10 Sep 2018 20:49:11 +0200 Subject: Fixes the dwa-131 e1 kernel module drive bug! --- .../hooks/update-boot-files.sh | 5 +- modules.d/dnbd-root-filesystem/module-setup.sh | 4 +- .../systemd-networkd-ext/hooks/wait-for-network.sh | 18 +++- modules.d/systemd-networkd-ext/module-setup.sh | 119 +-------------------- 4 files changed, 28 insertions(+), 118 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 c307451e..45973cbf 100755 --- a/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh +++ b/modules.d/dnbd-root-filesystem/hooks/update-boot-files.sh @@ -216,7 +216,10 @@ DEFAULT arch LABEL arch LINUX ../$kernel_file_path - APPEND $(cat /proc/cmdline | sed 's/ WIRELESS_BOOTIF=false//') + APPEND $( + cat /proc/cmdline | \ + sed 's/ WIRELESS_BOOTIF=false//' | \ + sed 's/10.21.9.111/192.168.188.20/g') INITRD ../$initramfs_file_path EOF boot_partition_mounted=true diff --git a/modules.d/dnbd-root-filesystem/module-setup.sh b/modules.d/dnbd-root-filesystem/module-setup.sh index 388276e6..467a2c80 100755 --- a/modules.d/dnbd-root-filesystem/module-setup.sh +++ b/modules.d/dnbd-root-filesystem/module-setup.sh @@ -275,7 +275,9 @@ install() { # endregion # region configuration files # Use terminal readline settings from the template system. - inst /etc/inputrc /etc/inputrc + inst_multiple \ + /etc/hostname \ + /etc/inputrc # Set some aliases for the initramfs context. if [ "$dnbd_root_filesystem_debug" = true ]; then inst "$moddir/configuration/bash" /etc/bash.bashrc diff --git a/modules.d/systemd-networkd-ext/hooks/wait-for-network.sh b/modules.d/systemd-networkd-ext/hooks/wait-for-network.sh index 72735b10..0b8f4afd 100755 --- a/modules.d/systemd-networkd-ext/hooks/wait-for-network.sh +++ b/modules.d/systemd-networkd-ext/hooks/wait-for-network.sh @@ -41,7 +41,7 @@ if (( ${#network_interface_names[@]} > 0 )); then for name in "${network_interface_names[@]}"; do /lib/systemd/systemd-networkd-wait-online \ --interface "$name" \ - --timeout 20 \ + --timeout 15 \ & subprocess_ids+=($!) done @@ -51,6 +51,22 @@ if (( ${#network_interface_names[@]} > 0 )); then break fi done + # NOTE: Fixes an ugly race condition bug bug with the "dwa-131 E1" usb + # wireless device. + if \ + ! $online && \ + ip -all | grep wireless && \ + modprobe --remove rtl8xxxu &>/dev/null + then + modprobe rtl8xxxu + if \ + /lib/systemd/systemd-networkd-wait-online \ + --interface wireless \ + --timeout 15 + then + online=true + fi + fi if ! $online; then if [ -f /mnt/slx_writable_device/openslx ]; then warn No network connection available: Starting in offline mode. diff --git a/modules.d/systemd-networkd-ext/module-setup.sh b/modules.d/systemd-networkd-ext/module-setup.sh index 915cfd44..418ad10e 100755 --- a/modules.d/systemd-networkd-ext/module-setup.sh +++ b/modules.d/systemd-networkd-ext/module-setup.sh @@ -41,131 +41,20 @@ installkernel() { # nlmon: Virtual netlink monitoring device. # usbhid: USB HID transport layer. # rtl*: USB wlan driver. + + #rtl8192cu \ + #rtl18xxxu \ instmods \ ccm \ ctr \ cfg80211 \ mac80211 \ - rtl8192cu \ - rtl18xxxu \ + rtl8xxxu \ iwlwifi \ iwldvm \ led_class \ nlmon \ usbhid - # iwd version: - instmods \ - ac \ - acpi_als \ - algif_aead \ - algif_hash \ - algif_skcipher \ - arc4 \ - cbc \ - cmac \ - coretemp \ - crc32c_generic \ - crc_itu_t \ - dcdbas \ - dell_rbtn \ - dell_smm_hwmon \ - dell_wmi \ - dell_wmi_descriptor \ - ehci_pci \ - fb_sys_fops \ - gpio_ich \ - hid_generic \ - i2c_algo_bit \ - iTCO_vendor_support \ - iTCO_wdt \ - input_leds \ - irqbypass \ - kfifo_buf \ - led_class \ - libcrc32c \ - libps2 \ - mac_hid \ - md4 \ - pcc_cpufreq \ - pcspkr \ - serio_raw \ - sha512_generic \ - snd_hwdep \ - soundcore \ - sparse_keymap \ - syscopyarea \ - sysfillrect \ - sysimgblt \ - usb_common \ - wmi_bmof \ - xxhash \ - ccm \ - evdev \ - acpi_cpufreq \ - battery \ - dell_laptop \ - des_generic \ - intel_agp \ - intel_gtt \ - joydev \ - mousedev \ - rtc_cmos \ - xor \ - af_alg \ - cqhci \ - dell_smbios \ - ip_tables \ - lpc_ich \ - rfkill \ - serio \ - sr_mod \ - wmi \ - atkbd \ - i2c_i801 \ - i8042 \ - snd_timer \ - ahci \ - libahci \ - sdhci_pci \ - firewire_ohci \ - sha512_ssse3 \ - snd_hda_intel \ - x_tables \ - agpgart \ - uhci_hcd \ - sdhci \ - snd_hda_codec_hdmi \ - usbhid \ - sd_mod \ - snd_hda_codec_idt \ - cdrom \ - firewire_core \ - industrialio \ - zstd_decompress \ - snd_hda_codec_generic \ - ehci_hcd \ - snd_hda_core \ - snd \ - raid6_pq \ - snd_pcm \ - rtl8xxxu \ - hid \ - snd_hda_codec \ - psmouse \ - mmc_core \ - zstd_compress \ - drm_kms_helper \ - scsi_mod \ - iwldvm \ - libata \ - e1000e \ - usbcore \ - iwlwifi \ - drm \ - kvm \ - cfg80211 \ - mac80211 \ - i915 } # called by dracut -- cgit v1.2.3-55-g7522