diff options
author | Alessandro Elias | 2016-02-19 19:59:51 +0100 |
---|---|---|
committer | Alessandro Elias | 2016-02-19 19:59:51 +0100 |
commit | 4615900f4103f3311734e192f5605f6a42ced19c (patch) | |
tree | d528e656e0d2213ef269ee27e5e4b6d771b293d8 | |
parent | Move hd root to sysroot (new system root). (diff) | |
download | systemd-init-hd-boot.tar.gz systemd-init-hd-boot.tar.xz systemd-init-hd-boot.zip |
Parse ip, so add to grub config, slxsrv and slxbase.hd-boot
Signed-off-by: Alessandro Elias <ae11@c3sl.ufpr.br>
-rw-r--r-- | builder/hd-boot/grub/etc/default/grub | 2 | ||||
-rwxr-xr-x | builder/hd-boot/hooks/partitioner.sh | 11 | ||||
-rwxr-xr-x | builder/hd-boot/module-setup.sh | 3 |
3 files changed, 8 insertions, 8 deletions
diff --git a/builder/hd-boot/grub/etc/default/grub b/builder/hd-boot/grub/etc/default/grub index 629f571c..309664d9 100644 --- a/builder/hd-boot/grub/etc/default/grub +++ b/builder/hd-boot/grub/etc/default/grub @@ -7,7 +7,7 @@ GRUB_DEFAULT=0 GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="OpenSLX" GRUB_CMDLINE_LINUX_DEFAULT="" -GRUB_CMDLINE_LINUX="loglevel=3 slxsrv=10.66.0.1 slxbase=slx-local/ rd.shell rd.info log_buf_len=1M" +GRUB_CMDLINE_LINUX="loglevel=3 rd.shell rd.info log_buf_len=1M ip=dhcp" #GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1" #GRUB_TERMINAL_INPUT="serial" diff --git a/builder/hd-boot/hooks/partitioner.sh b/builder/hd-boot/hooks/partitioner.sh index 21e12a94..de1763e7 100755 --- a/builder/hd-boot/hooks/partitioner.sh +++ b/builder/hd-boot/hooks/partitioner.sh @@ -198,18 +198,19 @@ create_dos_part() set_iface_to_cmdline() { - local tmp + local tmp max ifname _head _tail - tmp="$(cat /usr/share/grub/default/grub | grep -w 'GRUB_CMDLINE_LINUX=')" + tmp="$(cat /etc/default/grub | grep -w 'GRUB_CMDLINE_LINUX=')" [ -n "$tmp" ] || return 1 - mac=$(cat /tmp/net.ifaces) + mac=$(cat /tmp/net.ifaces | cut -d' ' -f1) + ifname=$(cat /tmp/net.ifaces | cut -d' ' -f2) [ -n "$mac" ] || return 1 _head="${tmp#*=\"}" _head="${_head%\"}" - _tail="ifname=$(cat /tmp/net.bootdev):$mac" - sed -r -i "s#GRUB_CMDLINE_LINUX=[\"].*[\"]#GRUB_CMDLINE_LINUX=\"$_head $_tail\"#" /usr/share/grub/default/grub + _tail="ifname=$ifname:$mac" + sed -r -i "s#GRUB_CMDLINE_LINUX=[\"].*[\"]#GRUB_CMDLINE_LINUX=\"$_head $_tail slxsrv=$slxsrv slxbase=$slxbase\"#" /etc/default/grub } install_boot_loader() diff --git a/builder/hd-boot/module-setup.sh b/builder/hd-boot/module-setup.sh index 136dbe74..04cf3581 100755 --- a/builder/hd-boot/module-setup.sh +++ b/builder/hd-boot/module-setup.sh @@ -33,8 +33,7 @@ install() { #inst_hook pre-udev 40 "$moddir/hooks/gen-netfiles.sh" # Must be 40, because dracut runs as 50 and 60 net-genrules.sh # mount hooks - inst_hook mount 11 "$moddir/move-hd-root_to_sysroot.sh" # Note priority 11, due to dnbd3-rootfs runs 10 mount sysroot. - + inst_hook pre-pivot 10 "$moddir/hooks/move-hd-root_to_sysroot.sh" # Note priority 11, due to dnbd3-rootfs runs 10 mount sysroot. # install buid-in kernel parameters for _i in "$moddir/etc/cmdline.d/"*.conf; do |