diff options
Diffstat (limited to 'modules.d/slx-network/module-setup.sh')
-rwxr-xr-x | modules.d/slx-network/module-setup.sh | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/modules.d/slx-network/module-setup.sh b/modules.d/slx-network/module-setup.sh index bf384322..6e28ba1f 100755 --- a/modules.d/slx-network/module-setup.sh +++ b/modules.d/slx-network/module-setup.sh @@ -24,19 +24,48 @@ install() { inst_libdir_file {"tls/$_arch/",tls/,"$_arch/",}"libnss_dns.so.*" # stage3 network scripts - inst "${moddir}/scripts/setup-bootif-network.stage3" "/usr/local/bin/setup-bootif-network" inst "${moddir}/scripts/udhcpc-trigger.stage3" "/usr/local/bin/udhcpc-trigger" # files for stage4, park them in /opt/openslx gcc -o "${initdir}/usr/local/bin/rdns" "${moddir}/rdns.c" - inst "${moddir}/scripts/setup-bootif-network.stage4" "/opt/openslx/scripts/setup-bootif-network.stage4" + inst "${moddir}/scripts/s3-setup-bootif-network.stage4" "/opt/openslx/scripts/s3-setup-bootif-network.stage4" inst "${moddir}/scripts/udhcpc-trigger.stage4" "/opt/openslx/scripts/udhcpc-trigger.stage4" - inst "${moddir}/services/udhcpc-bootif.service" "/opt/openslx/services/udhcpc-bootif.service" + inst "${moddir}/services/udhcpc-bootif-stage4.service" "/opt/openslx/services/udhcpc-bootif.service" + + # Parse IP config etc. from KCL + _name="s3-parse-network-kcl" + inst "$moddir/hooks/${_name}.sh" \ + "/usr/local/bin/${_name}.sh" + inst_simple "${moddir}/services/${_name}.service" \ + "${systemdsystemunitdir}/${_name}.service" + mkdir --parents \ + "${initdir}/${systemdsystemunitdir}/dracut-cmdline.service.requires" + ln_r "${systemdsystemunitdir}/${_name}.service" \ + "${systemdsystemunitdir}/dracut-cmdline.service.requires/${_name}.service" + # Setup bootif network: bridge, vlan, dhcp, ... + _name="s3-setup-bootif-network" + inst "$moddir/hooks/${_name}.sh" \ + "/usr/local/bin/${_name}.sh" + inst_simple "${moddir}/services/${_name}.service" \ + "${systemdsystemunitdir}/${_name}.service" + mkdir --parents \ + "${initdir}/${systemdsystemunitdir}/dracut-initqueue.service.wants" + ln_r "${systemdsystemunitdir}/${_name}.service" \ + "${systemdsystemunitdir}/dracut-initqueue.service.wants/${_name}.service" + # Copy files related to networking. Must be the very last thing before switchroot to + # make sure nothing else tries to meddle with these after copying, e.g. slx-ssl. + _name="s3-copy-network-files" + inst "$moddir/hooks/${_name}.sh" \ + "/usr/local/bin/${_name}.sh" + inst_simple "${moddir}/services/${_name}.service" \ + "${systemdsystemunitdir}/${_name}.service" + mkdir --parents \ + "${initdir}/${systemdsystemunitdir}/dracut-pre-pivot.service.requires" + ln_r "${systemdsystemunitdir}/${_name}.service" \ + "${systemdsystemunitdir}/dracut-pre-pivot.service.requires/${_name}.service" # hooks - inst_hook cmdline 10 "${moddir}/hooks/parse-ipxe-network-kcl.sh" inst_hook pre-pivot 10 "${moddir}/hooks/configure-jumbo-frames.sh" # DO NOT TOUCH THIS - inst_hook pre-pivot 99 "${moddir}/hooks/copy-network-files.sh" - inst_hook pre-pivot 60 "${moddir}/hooks/activate-bootif-dhcp.sh" + inst_hook pre-pivot 60 "${moddir}/hooks/activate-stage4-dhcp.sh" } |