diff options
| author | torben | 2015-11-20 18:04:24 +0100 |
|---|---|---|
| committer | torben | 2015-11-20 18:04:24 +0100 |
| commit | d6a46151403a93262a92fc85de335fa7591b9c5a (patch) | |
| tree | 673853ac7efebbdea52ce740a57f82bd4572cc25 | |
| parent | FIX CONSOLE IN INITRAMFS!!!!!! (diff) | |
| download | systemd-init-d6a46151403a93262a92fc85de335fa7591b9c5a.tar.gz systemd-init-d6a46151403a93262a92fc85de335fa7591b9c5a.tar.xz systemd-init-d6a46151403a93262a92fc85de335fa7591b9c5a.zip | |
Adding more resilient configuration server api.
4 files changed, 15 insertions, 8 deletions
diff --git a/builder/dnbd3-rootfs/hooks/pre-mount/fetch-config.sh b/builder/dnbd3-rootfs/hooks/pre-mount/fetch-config.sh index 411b2f7d..058edeed 100755 --- a/builder/dnbd3-rootfs/hooks/pre-mount/fetch-config.sh +++ b/builder/dnbd3-rootfs/hooks/pre-mount/fetch-config.sh @@ -2,11 +2,18 @@ command -v getarg >/dev/null || . /lib/dracut-lib.sh local configuration_file_name='config' info 'Getting configuration file.' -wget --timeout 5 --quiet "http://${SLX_SERVER}${SLX_SERVER_BASE}${configuration_file_name}" \ - --output-document "/$configuration_file_name" -local return_code="$?" +local IFS_backup="$IFS" +IFS="," +local host +for host in ${SLX_SERVER}; do + wget --timeout 5 --quiet "http://${host}${SLX_SERVER_BASE}${configuration_file_name}" \ + --output-document "/$configuration_file_name" + local return_code="$?" + [[ $return_code != 0 ]] && continue +done +IFS="$IFS_backup" if [[ $return_code != 0 ]]; then - warn "Downloading OpenSLX configuration file from \"${SLX_SERVER}${SLX_SERVER_BASE}${configuration_file_name}\" failed. Return code: $return_code" + warn "Downloading OpenSLX configuration file from all server in \"${SLX_SERVER}\" in location \"${SLX_SERVER_BASE}${configuration_file_name}\" failed. Return code: $return_code" emergency_shell -n "$0" return 1 fi diff --git a/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh b/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh index c7b2c1a5..4a5b57f3 100755 --- a/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh +++ b/builder/dnbd3-rootfs/hooks/pre-mount/prepare-root-partition.sh @@ -6,7 +6,7 @@ if ! systemd-preserve-process-marker dnbd3-client --host "$SLX_DNBD3_SERVERS" \ --image "${SLX_SERVER_BASE}${SLX_DNBD3_IMAGE}" --device \ "$SLX_DNBD3_DEVICE" --rid "$SLX_DNBD3_RID" then - warn "Failed to connect $SLX_DNBD3_IMAGE from $SLX_DNBD3_SERVER to $SLX_DNBD3_DEVICE" + warn "Failed to connect $SLX_DNBD3_IMAGE from $SLX_DNBD3_SERVERS to $SLX_DNBD3_DEVICE" emergency_shell -n "Error in $0" return 1 fi diff --git a/dev-tools/openslxTFTPRoot/pxelinux.cfg/default b/dev-tools/openslxTFTPRoot/pxelinux.cfg/default index eb065fe7..be39f633 100755 --- a/dev-tools/openslxTFTPRoot/pxelinux.cfg/default +++ b/dev-tools/openslxTFTPRoot/pxelinux.cfg/default @@ -62,7 +62,7 @@ LABEL net MENU LABEL ^Dracut TEST Torben KERNEL http://132.230.4.201:8080/vmlinuz-linux INITRD http://132.230.4.201:8080/initramfs-test.img - APPEND root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break vconsole.font=latarcyrheb-sun16 vconsole.keymap=de slxsrv=132.230.4.201:8008 slxbase=/archLinux/ vga=current + APPEND root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break vconsole.font=latarcyrheb-sun16 vconsole.keymap=de slxsrv=132.230.4.201:80,132.230.4.201:8080,132.230.4.201:8008,132.230.4.201:8090,132.230.4.201:8280,132.230.4.201:8888 slxbase=/archLinux/ vga=current IPAPPEND 3 MENU DEFAULT @@ -70,6 +70,6 @@ LABEL net MENU LABEL ^Dracut TEST Janosch KERNEL http://132.230.4.202:8080/vmlinuz-linux INITRD http://132.230.4.202:8080/initramfs-test.img - APPEND root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break vconsole.font=latarcyrheb-sun16 vconsole.keymap=de slxsrv=132.230.4.202 slxbase=/ vga=current + APPEND root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break vconsole.font=latarcyrheb-sun16 vconsole.keymap=de slxsrv=132.230.4.202:80,132.230.4.202:8080,132.230.4.202:8008,132.230.4.202:8090,132.230.4.202:8280,132.230.4.202:8888 slxbase=/ vga=current IPAPPEND 3 MENU DEFAULT diff --git a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default index c79410b8..da5eae74 100644 --- a/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default +++ b/dev-tools/virtualBoxTFTPRoot/pxelinux.cfg/default @@ -8,7 +8,7 @@ MENU TITLE My PXE Boot Menu LABEL arch MENU LABEL ^arch network boot KERNEL /vmlinuz-linux -APPEND initrd=/initramfs-test.img root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break ip=10.0.2.15::10.0.2.2:255.255.255.0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=de slxsrv=10.0.2.2:8080 slxbase=/archLinux/ vga=current +APPEND initrd=/initramfs-test.img root=PARTLABEL=system rw rootflags=subvol=root loglevel=2 acpi_osi="!Windows 2012" rd.info rd.break ip=10.0.2.15::10.0.2.2:255.255.255.0 vconsole.font=latarcyrheb-sun16 vconsole.keymap=de slxsrv=10.0.2.2:80,10.0.2.2:8080,10.0.2.2:8008,10.0.2.2:8090,10.0.2.2:8280,10.0.2.2:8888 slxbase=/archLinux/ vga=current LABEL BootNormal MENU LABEL ^Boot Normal (HDD) |
