Lines 125-130
Link Here
|
125 |
local lname="$(show_labels | sed -n "s/^$1[[:space:]]\+\(.*\)/\1/p")" |
125 |
local lname="$(show_labels | sed -n "s/^$1[[:space:]]\+\(.*\)/\1/p")" |
126 |
test -n "$lname" || lname="$(show_labels | sed -n "s/^1[[:space:]]\+\(.*\)/\1/p")" |
126 |
test -n "$lname" || lname="$(show_labels | sed -n "s/^1[[:space:]]\+\(.*\)/\1/p")" |
127 |
test -n "$lname" && sed -i "s/^\(default\)[[:space:]]\+.*/\1 $lname/" "$TFTPDIR/pxelinux.cfg/default" |
127 |
test -n "$lname" && sed -i "s/^\(default\)[[:space:]]\+.*/\1 $lname/" "$TFTPDIR/pxelinux.cfg/default" |
|
|
128 |
test -n "$lname" && sed -i "s/\(set default=\).*/\1$lname/" "$TFTPDIR/grub.cfg" |
128 |
} |
129 |
} |
129 |
|
130 |
|
130 |
##### downloading images |
131 |
##### downloading images |
Lines 299-304
Link Here
|
299 |
rm -f "$CURR" ||: |
300 |
rm -f "$CURR" ||: |
300 |
rm -f "$TFTPDIR/pxelinux.0" ||: |
301 |
rm -f "$TFTPDIR/pxelinux.0" ||: |
301 |
rm -rf "$TFTPDIR/syslinux" ||: |
302 |
rm -rf "$TFTPDIR/syslinux" ||: |
|
|
303 |
rm -f "$TFTPDIR/grub.cfg" ||: |
304 |
rm -f "$TFTPDIR/grubx64.efi" ||: |
305 |
rm -f "$TFTPDIR/shimx64.efi" ||: |
302 |
sed -i "\%^$CURR%d" /etc/fstab |
306 |
sed -i "\%^$CURR%d" /etc/fstab |
303 |
|
307 |
|
304 |
[ "$num" != "0" ] || return 0 |
308 |
[ "$num" != "0" ] || return 0 |
Lines 328-334
Link Here
|
328 |
fi |
332 |
fi |
329 |
mkdir -p "$TFTPDIR/pxelinux.cfg" || |
333 |
mkdir -p "$TFTPDIR/pxelinux.cfg" || |
330 |
fatal "Error: can't create $TFTPDIR/pxelinux.cfg" |
334 |
fatal "Error: can't create $TFTPDIR/pxelinux.cfg" |
331 |
|
335 |
if [ -f "$MNT/boot/grub/grub.cfg" ]; then |
|
|
336 |
cp -f "$MNT/boot/grub/grub.cfg" "$TFTPDIR/grub.cfg" || |
337 |
fatal "Error: can't copy $MNT/grub.cfg to $TFTPDIR" |
338 |
cp "/usr/lib64/efi/shimx64.efi" "$TFTPDIR" |
339 |
cp "/usr/lib64/efi/grubx64.efi" "$TFTPDIR" |
340 |
fi |
332 |
local tz="$(sed -n -e 's/^ZONE=\([^[:space:]]\+\)/\1/p' /etc/sysconfig/clock 2>/dev/null)" |
341 |
local tz="$(sed -n -e 's/^ZONE=\([^[:space:]]\+\)/\1/p' /etc/sysconfig/clock 2>/dev/null)" |
333 |
local lang="$(sed -n -e 's/^LANG=\([^[:space:]\.]\+\).*/\1/p' /etc/sysconfig/i18n 2>/dev/null)" |
342 |
local lang="$(sed -n -e 's/^LANG=\([^[:space:]\.]\+\).*/\1/p' /etc/sysconfig/i18n 2>/dev/null)" |
334 |
local vnc="$(cat $DATADIR/vncparams 2>/dev/null)" |
343 |
local vnc="$(cat $DATADIR/vncparams 2>/dev/null)" |
Lines 357-363
Link Here
|
357 |
}"\ |
366 |
}"\ |
358 |
"$TFTPDIR/syslinux/isolinux.cfg" \ |
367 |
"$TFTPDIR/syslinux/isolinux.cfg" \ |
359 |
> "$TFTPDIR/pxelinux.cfg/default" |
368 |
> "$TFTPDIR/pxelinux.cfg/default" |
360 |
|
369 |
# Setting up grub.cfg |
|
|
370 |
sed -e " |
371 |
s%\bset timeout\+\([^[:space:]]\+\)%set timeout=0% |
372 |
s%\(initrd\$linux_suffix\)[[:space:]]\+\([^[:space:]]\+\)%\1 syslinux\2% |
373 |
/^[[:space:]]*linux\$linux_suffix/{ |
374 |
s%\(linux\$linux_suffix\)[[:space:]]\+\([^[:space:]]\+\)%\1 syslinux\2% |
375 |
s%automatic=[^[:space:]]\+%% |
376 |
s%\$% automatic=method:nfs,network:dhcp${tz:+ tz=$tz} ${lang:+ lang=$lang} ${krb5:+ krb5} $vnc% |
377 |
}" "$TFTPDIR/syslinux/boot/grub/grub.cfg" > "$TFTPDIR/grub.cfg" |
361 |
# Setting up DHCP using alterator-dhcp |
378 |
# Setting up DHCP using alterator-dhcp |
362 |
if [ -f /usr/bin/alterator-dhcp-functions ];then |
379 |
if [ -f /usr/bin/alterator-dhcp-functions ];then |
363 |
. /usr/bin/alterator-dhcp-functions |
380 |
. /usr/bin/alterator-dhcp-functions |