From d46fd801bfade7f69f79b3846d4413c0278fffaa Mon Sep 17 00:00:00 2001 From: torben Date: Mon, 4 May 2015 13:52:03 +0200 Subject: Pepare merge. --- grub2.conf | 2 +- readme.md | 3 +++ testModule/hooks/cmdline.sh | 29 ----------------------------- testModule/hooks/cmdlineOLD.sh | 30 ++++++++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 30 deletions(-) delete mode 100755 testModule/hooks/cmdline.sh create mode 100755 testModule/hooks/cmdlineOLD.sh diff --git a/grub2.conf b/grub2.conf index ec2aff90..751642de 100755 --- a/grub2.conf +++ b/grub2.conf @@ -6,7 +6,7 @@ menuentry 'test' --class centos --class gnu-linux --class gnu --class os --unres insmod part_msdos insmod xfs set root='hd0,msdos1' - linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 rw vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 rd.neednet=1 # NOTE: Prevents dracut console: console=tty0 console=ttyS0,9600 ip=enp0s3:dhcp root=/dev/nbd0 rootfstype=ext4 + linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 rw vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break root=dhcp ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 rd.neednet=1 # NOTE: Prevents dracut console: console=tty0 console=ttyS0,9600 ip=enp0s3:dhcp root=/dev/nbd0 rootfstype=ext4 #linux16 /vmlinuz-3.10.0-229.1.2.el7.x86_64 rw vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break rd.debug rd.shell rd.info root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 rd.udev.log-priority=debug ip=10.0.2.15:132.230.4.2:10.0.2.2:255.255.255.0 initrd16 /initramfs-test.img diff --git a/readme.md b/readme.md index 6bfa7db7..dad940fd 100644 --- a/readme.md +++ b/readme.md @@ -1,3 +1,6 @@ +# TODO --ommit npd +# TODO Testmenue PW: t + h1. Evaluation, dissection and modification of Linux remote boot h2. Inhalt diff --git a/testModule/hooks/cmdline.sh b/testModule/hooks/cmdline.sh deleted file mode 100755 index 340467df..00000000 --- a/testModule/hooks/cmdline.sh +++ /dev/null @@ -1,29 +0,0 @@ -# Converts ip configuration format given by the pxe pre boot provider to a -# dracut compatible static ip configuration. - -source /usr/lib/test-library.sh - -for parameter in $(getargs ip=); do - local temp="$parameter:" - set -- - while [ -n "$temp" ]; do - set -- "$@" "${temp%%:*}" - temp=${temp#*:} - done - - [ -n "$1" ] && ip=$1 - [ -n "$2" ] && server_ip=$2 - [ -n "$3" ] && gateway_ip=$3 - [ -n "$4" ] && net_mask=$4 - - warn "PXE given net configuration: ip: $ip server_ip: $server_ip gateway_ip: $gateway_ip net_mask: $net_mask" - local final_dracut_ip_config="$ip::$gateway_ip:$net_mask:dracut_test_client:enp0s3:none" - warn "Final dracut ip config: $final_dracut_ip_config" - replace_cmd ip "$final_dracut_ip_config" -done - -# NOTE: Doesn't work since dracuts needed version of mount doesn't support -# binds. -#cat /proc/cmdline | sed --regexp-extended 's/ip=[^ ]+//g' \ -# >"$temporary_kernel_commandline_file_path" && \ -#mount -n --rbind -o ro "$temporary_kernel_commandline_file_path" /proc/cmdline diff --git a/testModule/hooks/cmdlineOLD.sh b/testModule/hooks/cmdlineOLD.sh new file mode 100755 index 00000000..95f6f6a6 --- /dev/null +++ b/testModule/hooks/cmdlineOLD.sh @@ -0,0 +1,30 @@ +# Converts ip configuration format given by the pxe pre boot provider to a +# dracut compatible static ip configuration. + +source /usr/lib/test-library.sh + +for parameter in $(getargs ip=); do + local temp="$parameter:" + set -- + while [ -n "$temp" ]; do + set -- "$@" "${temp%%:*}" + temp=${temp#*:} + done + + [ -n "$1" ] && ip=$1 + [ -n "$2" ] && server_ip=$2 + [ -n "$3" ] && gateway_ip=$3 + [ -n "$4" ] && net_mask=$4 + + warn "PXE given net configuration: ip: $ip server_ip: $server_ip gateway_ip: $gateway_ip net_mask: $net_mask" + local final_dracut_ip_config="$ip:$server_ip:$gateway_ip:$net_mask:dracut_test_client:enp0s3:none" + warn "Final dracut ip config: $final_dracut_ip_config" + replace_cmd ip "$final_dracut_ip_config" + echo "root-path=nfs:$server_ip:/">>/tmp/cmdline +done + +# NOTE: Doesn't work since dracuts needed version of mount doesn't support +# binds. +#cat /proc/cmdline | sed --regexp-extended 's/ip=[^ ]+//g' \ +# >"$temporary_kernel_commandline_file_path" && \ +#mount -n --rbind -o ro "$temporary_kernel_commandline_file_path" /proc/cmdline -- cgit v1.2.3-55-g7522