Began implementing timezone logic
This commit is contained in:
parent
6c660b941a
commit
6b20dba53e
@ -92,6 +92,20 @@ get_answer () {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_timezones () {
|
||||||
|
local -n OUTPUT_VAR="${1:?"get_timezones: Output variable not provied"}"
|
||||||
|
local -a OPTIONS=( $(
|
||||||
|
cd /usr/share/zoneinfo
|
||||||
|
for DIR in $( ls -1 ); do
|
||||||
|
for ITEM in $DIR/*; do
|
||||||
|
echo "$DIR/$ITEM"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
)
|
||||||
|
)
|
||||||
|
OUTER_VAR=$OPTIONS
|
||||||
|
}
|
||||||
|
|
||||||
# END: Helper Functions
|
# END: Helper Functions
|
||||||
|
|
||||||
# BEGIN: Variables
|
# BEGIN: Variables
|
||||||
@ -102,7 +116,6 @@ get_answer "What is the hostname of this machine?" HOSTNAME
|
|||||||
BOOT_METHOD=""
|
BOOT_METHOD=""
|
||||||
get_choice "What is your boot method?" BOOT_METHOD BIOS EFI
|
get_choice "What is your boot method?" BOOT_METHOD BIOS EFI
|
||||||
|
|
||||||
exit
|
|
||||||
DISK="${2:?"Disk was not provided"}"
|
DISK="${2:?"Disk was not provided"}"
|
||||||
[[ ! -b $DISK ]] && {
|
[[ ! -b $DISK ]] && {
|
||||||
echo "Your disk ($DISK) does not exist. Please provide a valid one"
|
echo "Your disk ($DISK) does not exist. Please provide a valid one"
|
||||||
@ -114,10 +127,19 @@ SWAP_PARTITION=${DISK}2
|
|||||||
ROOT_PARTITION=${DISK}3
|
ROOT_PARTITION=${DISK}3
|
||||||
|
|
||||||
## New Login creds for your new user and the root user
|
## New Login creds for your new user and the root user
|
||||||
ROOT_PASSWORD="root"
|
ROOT_PASSWORD=""
|
||||||
NEW_USER="username"
|
get_answer "What do you want the root password to be? : " ROOT_PASSWORD
|
||||||
NEW_PASSWORD="password"
|
|
||||||
|
|
||||||
|
NEW_USER=""
|
||||||
|
get_answer "What other user do you want to configure on the system? : " NEW_USER
|
||||||
|
|
||||||
|
NEW_PASSWORD="password"
|
||||||
|
get_answer "What do you want the password for $NEW_USER to be? : " NEW_PASSWORD
|
||||||
|
|
||||||
|
declare -a TIMEZONES
|
||||||
|
get_timezones TIMEZONES
|
||||||
|
echo "${TIMEZONES[@]}"
|
||||||
|
exit
|
||||||
TIMEZONE_INFO=America/Chicago
|
TIMEZONE_INFO=America/Chicago
|
||||||
LOCALE=en_US.UTF-8
|
LOCALE=en_US.UTF-8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user