summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2016-07-29 15:11:16 +0200
committerJonathan Bauer2016-07-29 15:11:16 +0200
commitfa3ccf4ce309ac0143c5afafc4ab8187bd0b4723 (patch)
treea5419bec687f82b457471027916fd71e7f6ad738
parentrespect system's dracut configuration (diff)
downloadsystemd-init-fa3ccf4ce309ac0143c5afafc4ab8187bd0b4723.tar.gz
systemd-init-fa3ccf4ce309ac0143c5afafc4ab8187bd0b4723.tar.xz
systemd-init-fa3ccf4ce309ac0143c5afafc4ab8187bd0b4723.zip
add modules for infiniband/bootnet sysconfig scripts
-rwxr-xr-xbuilder/bootnet-conf/module-setup.sh13
-rwxr-xr-xbuilder/bootnet-conf/scripts/gen-bootnet-conf.sh18
-rwxr-xr-xbuilder/ib-conf/module-setup.sh13
-rwxr-xr-xbuilder/ib-conf/scripts/gen-ib-conf.sh24
-rw-r--r--packager/openslx.config2
5 files changed, 69 insertions, 1 deletions
diff --git a/builder/bootnet-conf/module-setup.sh b/builder/bootnet-conf/module-setup.sh
new file mode 100755
index 00000000..0a80d89e
--- /dev/null
+++ b/builder/bootnet-conf/module-setup.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+check() {
+ # Tell dracut that this module should only be included if it is required
+ # explicitly.
+ return 255
+}
+depends() {
+ echo dnbd3-rootfs
+}
+install() {
+ inst_hook pre-pivot 50 "$moddir/scripts/gen-ib-conf.sh"
+}
diff --git a/builder/bootnet-conf/scripts/gen-bootnet-conf.sh b/builder/bootnet-conf/scripts/gen-bootnet-conf.sh
new file mode 100755
index 00000000..ec82f143
--- /dev/null
+++ b/builder/bootnet-conf/scripts/gen-bootnet-conf.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
+
+mac="$(getargs BOOTIF=)"
+mac="$(echo $mac | cut -c 4- | tr '-' ':')"
+if [ -n "${mac}" ]; then
+ cat << EOF >> "${NEWROOT}/etc/sysconfig/network-scripts/ifcfg-bootnet"
+DEVICE=bootnet
+NAME=bootnet
+HWADDR=${mac}
+BOOTPROTO=dhcp
+ONBOOT=yes
+NM_CONTROLLED=yes
+EOF
+else
+ echo "Could not parse MAC"
+fi
diff --git a/builder/ib-conf/module-setup.sh b/builder/ib-conf/module-setup.sh
new file mode 100755
index 00000000..0a80d89e
--- /dev/null
+++ b/builder/ib-conf/module-setup.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+check() {
+ # Tell dracut that this module should only be included if it is required
+ # explicitly.
+ return 255
+}
+depends() {
+ echo dnbd3-rootfs
+}
+install() {
+ inst_hook pre-pivot 50 "$moddir/scripts/gen-ib-conf.sh"
+}
diff --git a/builder/ib-conf/scripts/gen-ib-conf.sh b/builder/ib-conf/scripts/gen-ib-conf.sh
new file mode 100755
index 00000000..2d4b7a27
--- /dev/null
+++ b/builder/ib-conf/scripts/gen-ib-conf.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
+
+IPSUFFIX=$(
+ ip -4 -o addr show dev bootnet | \
+ awk '{split($4,a,"/");split(a[1],b,".");print b[3]"."b[4]}'
+)
+
+cat << EOF >> "${NEWROOT}/etc/sysconfig/network-scripts/ifcfg-ib0"
+DEVICE=ib0
+NAME=ib0
+TYPE=Infiniband
+BOOTPROTO=static
+IPADDR=10.12.${IPSUFFIX}
+BROADCAST=10.12.255.255
+NETWORK=10.12.0.0
+NETMASK=255.255.0.0
+ONBOOT=yes
+NM_CONTROLLED=yes
+CONNECTED_MODE=yes
+MTU=65520
+EOF
+
diff --git a/packager/openslx.config b/packager/openslx.config
index 0f785e1b..985ace1a 100644
--- a/packager/openslx.config
+++ b/packager/openslx.config
@@ -9,7 +9,7 @@ DEFAULT_RSYNC_OPTS="--acls \
--verbose"
# default options used by rsync
-DEFAULT_RSYNC_RSH="ssh -c blowfish -o StrictHostKeyChecking=no"
+DEFAULT_RSYNC_RSH="ssh -c aes256-ctr -o StrictHostKeyChecking=no"
# default size for the qcow2-container
DEFAULT_CONTAINER_SIZE="20G"