install stage 1: Would help to actually tell sed which file to edit
parent
db6c18e67a
commit
cdc16c1ad4
|
@ -1,13 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
function press_any_key {
|
function press_any_key {
|
||||||
echo "Press any key to continue or Ctrl+c to abort."
|
echo "Press any key to continue or Ctrl+c to abort..."
|
||||||
read -n1 DISCARD_ME
|
read -n1 DISCARD_ME
|
||||||
}
|
}
|
||||||
|
|
||||||
function are_you_really_really_sure {
|
function are_you_really_really_sure {
|
||||||
echo "Enter the following to continue: $1"
|
echo "Enter the following to continue: $1"
|
||||||
read DISCARD_ME
|
read -p "> " DISCARD_ME
|
||||||
if [ "$1" = "$DISCARD_ME" ]; then
|
if [ "$1" = "$DISCARD_ME" ]; then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
|
@ -18,7 +18,7 @@ function are_you_really_really_sure {
|
||||||
function yesno {
|
function yesno {
|
||||||
unset DISCARD_ME
|
unset DISCARD_ME
|
||||||
while [ -z "$DISCARD_ME" ]; do
|
while [ -z "$DISCARD_ME" ]; do
|
||||||
read -p "[y/n]" -n1 DISCARD_ME
|
read -p "[y/n] " -n1 DISCARD_ME
|
||||||
case "$DISCARD_ME" in
|
case "$DISCARD_ME" in
|
||||||
y)
|
y)
|
||||||
return 0
|
return 0
|
||||||
|
@ -147,8 +147,6 @@ echo "Storage is now prepared and ready for installation.
|
||||||
You need to select a download mirror for Void next.
|
You need to select a download mirror for Void next.
|
||||||
The script will launch xmirror on the host/live system and determine
|
The script will launch xmirror on the host/live system and determine
|
||||||
the chosen mirror from the config file it generates.
|
the chosen mirror from the config file it generates.
|
||||||
|
|
||||||
TODO:
|
|
||||||
"
|
"
|
||||||
press_any_key
|
press_any_key
|
||||||
|
|
||||||
|
@ -191,7 +189,7 @@ UUID=$(blkid --output value --match-tag UUID $TARGET_PART_EFI) /boot/efi vfat de
|
||||||
" > /mnt/target/etc/fstab
|
" > /mnt/target/etc/fstab
|
||||||
|
|
||||||
if grep "#KEYMAP=" /mnt/target/etc/rc.conf; then
|
if grep "#KEYMAP=" /mnt/target/etc/rc.conf; then
|
||||||
sed -i -e 's/#KEYMAP=.*/KEYMAP="'"$KBD_LAYOUT"'"/'
|
sed -i -e 's/#KEYMAP=.*/KEYMAP="'"$KBD_LAYOUT"'"/' /mnt/target/etc/rc.conf
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
echo "WARNING: Could not locate the keymap setting in rc.conf."
|
echo "WARNING: Could not locate the keymap setting in rc.conf."
|
||||||
|
@ -213,7 +211,7 @@ the time zone on-the-fly. If you use Windows, you will want to answer no here.
|
||||||
"
|
"
|
||||||
if yesno; then
|
if yesno; then
|
||||||
if grep "#HARDWARECLOCK=" /mnt/target/etc/rc.conf; then
|
if grep "#HARDWARECLOCK=" /mnt/target/etc/rc.conf; then
|
||||||
sed -i -e 's/#HARDWARECLOCK=.*/HARDWARECLOCK="UTC"/'
|
sed -i -e 's/#HARDWARECLOCK=.*/HARDWARECLOCK="UTC"/' /mnt/target/etc/rc.conf
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
echo "WARNING: Could not locate the hardwareclock setting in rc.conf."
|
echo "WARNING: Could not locate the hardwareclock setting in rc.conf."
|
||||||
|
@ -226,7 +224,7 @@ if yesno; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if grep "#HARDWARECLOCK=" /mnt/target/etc/rc.conf; then
|
if grep "#HARDWARECLOCK=" /mnt/target/etc/rc.conf; then
|
||||||
sed -i -e 's/#HARDWARECLOCK=.*/HARDWARECLOCK="localtime"/'
|
sed -i -e 's/#HARDWARECLOCK=.*/HARDWARECLOCK="localtime"/' /mnt/target/etc/rc.conf
|
||||||
else
|
else
|
||||||
clear
|
clear
|
||||||
echo "WARNING: Could not locate the hardwareclock setting in rc.conf."
|
echo "WARNING: Could not locate the hardwareclock setting in rc.conf."
|
||||||
|
|
Loading…
Reference in New Issue