19-define-os-ip #24
11
setup.sh
11
setup.sh
@ -36,6 +36,17 @@ trap '[ "$?" -ne 77 ] || exit 77' ERR
|
|||||||
|
|
||||||
declare zpool_drive efi_drive boot_drive part_schema
|
declare zpool_drive efi_drive boot_drive part_schema
|
||||||
|
|
||||||
|
function calculate_prefix_from_netmask () {
|
||||||
|
# https://stackoverflow.com/a/50419919
|
||||||
|
c='0'
|
||||||
|
x='0'"$(printf -- '%o' ${1//./ })"
|
||||||
|
while [ "${x}" -gt '0' ]; do
|
||||||
|
# Modulo then bitwise-shift x and store as new x
|
||||||
|
let c+="$(( x % 2 ))" 'x>>=1'
|
||||||
|
done
|
||||||
|
printf -- '%s' '/'"${c}";
|
||||||
|
}
|
||||||
|
|
||||||
function setup_env_vars () {
|
function setup_env_vars () {
|
||||||
printf -- '%s\n' \
|
printf -- '%s\n' \
|
||||||
'We will go over a series of questions to create an answer file with' \
|
'We will go over a series of questions to create an answer file with' \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user