Fix regular expressions to work with Jessie grub
This commit is contained in:
parent
cc5dbbe97b
commit
2c39e8f284
2 changed files with 3 additions and 3 deletions
|
@ -29,7 +29,7 @@ if [ $(echo "$LANGSEL" | wc -l) -eq 2 ]; then
|
|||
else
|
||||
# Selected language is the last in the file
|
||||
LANG="$LANGSEL"
|
||||
NEXTLANG="$(egrep -v "^[[:space:]]*(#.*)?$" langlist | head -n1)"
|
||||
NEXTLANG="$(egrep -v '^[[:space:]]*(#.*)?$' langlist | head -n1)"
|
||||
fi
|
||||
|
||||
LOCALE=$(echo "$LANG" | cut -d: -f1)
|
||||
|
@ -39,7 +39,7 @@ GRUBLINE=$(echo "$LANG" | cut -d: -f4)
|
|||
sed -i "s/LANGNAME \".*\"/LANGNAME \"$LANGNAME\"/" preseed_early
|
||||
|
||||
sed -i "s/locale=.*$/locale=$LOCALE $GRUBLINE/
|
||||
s/^set default=.*$/set default=\"2\"/" $ROOT/boot/grub/grub.cfg
|
||||
s/^\([[:space:]]*\)set default=\"[[:digit:]]*\"$/\1set default=\"2\"/" $ROOT/boot/grub/grub.cfg
|
||||
|
||||
# Comment out the next three lines if you don't want the language to change
|
||||
N_LOCALE=$(echo "$NEXTLANG" | cut -d: -f1)
|
||||
|
|
|
@ -11,7 +11,7 @@ echo "@reboot root /root/cronscript; reboot" >>/target/etc/crontab
|
|||
|
||||
mount /dev/discs/disc0/part1 /hd-media -o remount,rw
|
||||
|
||||
sed -i "s/^set default=.*$/set default=\"3\"/" /hd-media/boot/grub/grub.cfg
|
||||
sed -i "s/^\([[:space:]]*\)set default=\"[[:digit:]]*\"$/\1set default=\"3\"/" /hd-media/boot/grub/grub.cfg
|
||||
|
||||
if [ -d /target/etc/gdm3 ] ; then
|
||||
# Enable automatic login (chroot because of bug in busybox sed)
|
||||
|
|
Loading…
Add table
Reference in a new issue