Merge "Add iscsi-boot element"
This commit is contained in:
commit
725d469c88
13
diskimage_builder/elements/iscsi-boot/README.rst
Normal file
13
diskimage_builder/elements/iscsi-boot/README.rst
Normal file
@ -0,0 +1,13 @@
|
||||
==========
|
||||
iscsi-boot
|
||||
==========
|
||||
Handles configuration for the disk to be capable of serving as
|
||||
a remote root filesystem through iSCSI. Currently, this element
|
||||
only configures Ubuntu/Debian images.
|
||||
|
||||
It performs the following actions:
|
||||
|
||||
* Installs the ``open-iscsi`` package.
|
||||
* Creates the ``etc/iscsi/iscsi.initramfs`` configuration file and sets
|
||||
``ISCSI_AUTO=true`` within it.
|
||||
* Updates the initramfs to apply the changes.
|
1
diskimage_builder/elements/iscsi-boot/element-deps
Normal file
1
diskimage_builder/elements/iscsi-boot/element-deps
Normal file
@ -0,0 +1 @@
|
||||
package-installs
|
@ -0,0 +1,2 @@
|
||||
open-iscsi:
|
||||
phase: install.d
|
13
diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config
Executable file
13
diskimage_builder/elements/iscsi-boot/post-install.d/open-iscsi-config
Executable file
@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
if [[ $DISTRO_NAME = "ubuntu" || $DISTRO_NAME = "debian" ]]; then
|
||||
echo "ISCSI_AUTO=true" > /etc/iscsi/iscsi.initramfs
|
||||
update-initramfs -u
|
||||
fi
|
Loading…
Reference in New Issue
Block a user