summaryrefslogtreecommitdiffstats
path: root/builder/hd-boot/hooks/partitioner.sh
diff options
context:
space:
mode:
Diffstat (limited to 'builder/hd-boot/hooks/partitioner.sh')
-rwxr-xr-xbuilder/hd-boot/hooks/partitioner.sh11
1 files changed, 6 insertions, 5 deletions
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()