# User questions are seperated into functions to be reused in alternative installers
# like topinstall.sh
-
# check if the install session is GUI or cli
guimode() {
if [ -e /opt/noguimode ]; then
if [ -z "$OTHERKEY" ]; then
unset NEWKEY
else
+ # newline is intentional!!!
echo "
$OTHERKEY" >/root/instantARCH/data/lang/keyboard/other
fi
if [ "${NEWKEY}" = "forcequit" ]; then
exit 1
fi
-
- echo "$NEWKEY" >/root/instantARCH/config/keyboard
+ iroot keyboard "$NEWKEY"
}
# ask for default locale
while [ -z "$NEWLOCALE" ]; do
NEWLOCALE="$(ls | imenu -l 'Select language> ')"
done
- echo "$NEWLOCALE" >/root/instantARCH/config/locale
+ iroot locale "$NEWLOCALE"
}
done
fi
- echo "$REGION" >/root/instantARCH/config/region
- [ -n "$CITY" ] && echo "$CITY" >/root/instantARCH/config/city
+ [ -n "$CITY" ] && iroot city "$CITY"
}
done
if grep -qi "dkms" <<<"$DRIVERCHOICE"; then
- echo "dkms" >/root/instantARCH/config/graphics
+ iroot graphics "dkms"
elif grep -qi "nvidia" <<<"$DRIVERCHOICE"; then
- echo "nvidia" >/root/instantARCH/config/graphics
+ iroot graphics "nvidia"
elif grep -qi "open" <<<"$DRIVERCHOICE"; then
- echo "open" >/root/instantARCH/config/graphics
+ iroot graphics "open"
elif [ -z "$DRIVERCHOICE" ]; then
- echo "nodriver" >/root/instantARCH/config/graphics
+ iroot graphics "nodriver"
fi
else
NEWPASS2="$(imenu -P 'confirm password')"
done
- echo "$NEWUSER" >/root/instantARCH/config/user
- echo "$NEWPASS" >/root/instantARCH/config/password
+ iroot user "$NEWUSER"
+ iroot user "$NEWPASS"
}
IROOT="/root/instantARCH/config"
+if [ -z "$1" ]; then
+ echo "usage:
+set value: iroot field value
+get value: iroot field
+remove/stdin: iroot r/i field"
+ exit
+fi
+
if [ "$1" = "i" ]; then
cat /dev/stdin >"$IROOT/$2"
+elif [ "$1" = "r" ]; then
+ [ -e "$IROOT/$2" ] && rm "$IROOT/$2"
elif [ -n "$2" ]; then
echo "$2" >"$IROOT/$1"
else
[ -e /opt/noerror ] && rm /opt/noerror
# make instantOS packages optional
-if ! [ -e /root/instantARCH/config/onlyarch ] &&
+if iroot onlyarch &&
! [ -e /opt/onlyarch ]; then
chrootscript "instantos/install" "configuring instantOS, this will take a while"
if grep -iq 'manjaro' /etc/os-release; then