diff options
| author | torben | 2015-11-27 13:35:36 +0100 |
|---|---|---|
| committer | torben | 2015-11-27 13:35:36 +0100 |
| commit | d2f2741e99aa166472d2f350ce5ee27b0bf31f6c (patch) | |
| tree | e4a085c173669fd191e2267c1765c0c9a800665b /builder | |
| parent | added mount options to config (diff) | |
| download | systemd-init-d2f2741e99aa166472d2f350ce5ee27b0bf31f6c.tar.gz systemd-init-d2f2741e99aa166472d2f350ce5ee27b0bf31f6c.tar.xz systemd-init-d2f2741e99aa166472d2f350ce5ee27b0bf31f6c.zip | |
Fix bootname dependency.
Diffstat (limited to 'builder')
| -rwxr-xr-x | builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh b/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh index 19737eaa..aca0e0c7 100755 --- a/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh +++ b/builder/dnbd3-rootfs/hooks/cmdline/prepare-kernel-command-line-parameter.sh @@ -6,6 +6,18 @@ mkdir --parents "$writeable_proc_cmdline_path" # hack to work. mount --types tmpfs tmpfs "$writeable_proc_cmdline_path" +echo '-----------------------Kernel-Command-Line:-----------------------------' +cat /proc/cmdline +echo '------------------------------------------------------------------------' + +local parameter +for parameter in $(getargs BOOTIF=); do + info "PXE given boot interface $parameter" + local interface_name="bootnet:$(echo $parameter | sed --regexp-extended \ + 's/[0-9]{2}-(([0-9]{2}-){5}[0-9]{2})/\1/' | sed s/-/:/g)" + info "Dracut interface name is: $interface_name" + echo " ifname=$interface_name" >> "${writeable_proc_cmdline_path}cmdline" +done local parameter for parameter in $(getargs ip=); do local temp="$parameter:" @@ -21,14 +33,13 @@ for parameter in $(getargs ip=); do [ -n "$4" ] && net_mask=$4 info "PXE given net configuration: ip: $ip server_ip: $server_ip gateway_ip: $gateway_ip net_mask: $net_mask" - # TODO arch needs enp0s3 and ubuntu needs eth0 here! - local final_dracut_ip_configuration="$ip::$gateway_ip:$net_mask::enp0s3:off" - info "Final dracut ip configuration is: $final_dracut_ip_configuration" - sed --regexp-extended "s/ip=[^ ]*/ip=$final_dracut_ip_configuration/g" \ + local dracut_ip_configuration="$ip::$gateway_ip:$net_mask::bootnet:off" + info "Dracut ip configuration is: $dracut_ip_configuration" + sed --regexp-extended "s/ip=[^ ]*/ip=$dracut_ip_configuration/g" \ /proc/cmdline > "${writeable_proc_cmdline_path}cmdline" done -if [ -z "$final_dracut_ip_configuration" ]; then +if [ -z "$dracut_ip_configuration" ]; then warn 'No "ip" parameter found in the kernel command line.' fi mount --options bind "${writeable_proc_cmdline_path}cmdline" /proc/cmdline |
