fix syntax errors and ignore x11 stuff when installing minimal editions

This commit is contained in:
Dan Johansen 2020-03-08 22:01:47 +01:00
parent 906ed30c1b
commit ed3f410191
No known key found for this signature in database
GPG Key ID: 084A7FC0035B1D49
1 changed files with 5 additions and 2 deletions

View File

@ -180,11 +180,13 @@ create_install() {
echo "LANG=$LOCALE" | tee --append $TMPDIR/root/etc/locale.conf 1> /dev/null 2>&1
$NSPAWN $TMPDIR/root locale-gen
echo "KEYMAP=$CLIKEYMAP" | tee --append $TMPDIR/root/etc/vconsole.conf 1> /dev/null 2>&1
if [[ "$EDITION" != "minimal" ]]; then
echo 'Section "InputClass"' > $TMPDIR/root/etc/X11/xorg.conf.d/00-keyboard.conf
echo 'Identifier "system-keyboard"' >> $TMPDIR/root/etc/X11/xorg.conf.d/00-keyboard.conf
echo 'Option "XkbLayout" "us"' >> $TMPDIR/root/etc/X11/xorg.conf.d/00-keyboard.conf
echo 'EndSection' >> $TMPDIR/root/etc/X11/xorg.conf.d/00-keyboard.conf
sed -i s/"us"/"$X11KEYMAP"/ $TMPDIR/root/etc/X11/xorg.conf.d/00-keyboard.conf
fi
echo "$HOSTNAME" | tee --append $TMPDIR/root/etc/hostname 1> /dev/null 2>&1
sed -i s/"enable systemd-resolved.service"/"#enable systemd-resolved.service"/ $TMPDIR/root/usr/lib/systemd/system-preset/90-systemd.preset
@ -235,7 +237,6 @@ prepare_card () {
mkdir -p $TMPDIR/boot
mount ${SDCARD}${SDDEV}1 $TMPDIR/boot
mount ${SDCARD}${SDDEV}2 $TMPDIR/root
fi
}
cleanup () {
@ -490,6 +491,7 @@ else
exit 1
fi
if [[ "$EDITION" != "minimal" ]]; then
if [ ! -z "$CLIKEYMAP" ]; then
let i=0
W=()
@ -505,8 +507,9 @@ else
clear
exit 1
fi
fi
if [ ! -z "$X11KEYMAP" ]; then
if [ ! -z "$CLIKEYMAP" ]; then
HOSTNAME=$(dialog --clear --title "Manjaro ARM Installer" \
--inputbox "Enter desired hostname for this system:" 8 50 \
3>&1 1>&2 2>&3 3>&- \