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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue