Add configure network implementation

install-scripts
trivernis 2 years ago
parent 5548e05319
commit e348549800
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: DFFFCC2C7A02DB45

@ -1,5 +1,33 @@
let RUN_IN_CHROOT = true;
def set_hostname [hostname: string] {
debug $"Setting host name to ($hostname)"
touch /etc/hostname
$"\n($hostname)\n" | save -a /etc/hostname
}
def create_hosts [] {
debug "Configuring hosts file"
touch /etc/hosts
"\n127.0.0.1 localhost\n" | save -a /etc/hosts
}
def create_ipv6_loopback [] {
debug "Creating ipv6 loopback"
touch /etc/hosts
"\n::1 localhost\n" | save -a /etc/hosts
}
# Applies all system changes of `configure-network`
def main [cfg] {
echo "Executing up task `configure-network` with config" $cfg
debug $"Configuring network with config ($cfg)"
set_hostname $cfg.hostname
create_hosts
if $cfg.ipv6_loopback {
create_ipv6_loopback
}
info "Configured network"
}

@ -2,4 +2,5 @@ let RUN_IN_CHROOT = true;
# Applies all system changes of `configure-unakite`
def main [cfg] {
echo "Executing up task `configure-unakite` with config" $cfg
todo "Implement configure-unakite"
}

@ -2,4 +2,6 @@ let RUN_IN_CHROOT = true;
# Applies all system changes of `install-extra-packages`
def main [cfg] {
echo "Executing up task `install-extra-packages` with config" $cfg
todo "Implement install-extra packages"
}

@ -2,4 +2,5 @@ let RUN_IN_CHROOT = true;
# Applies all system changes of `install-timeshift`
def main [cfg] {
echo "Executing up task `install-timeshift` with config" $cfg
todo "Implement install-timeshift"
}

@ -2,4 +2,5 @@ let RUN_IN_CHROOT = true;
# Applies all system changes of `install-zramd`
def main [cfg] {
echo "Executing up task `install-zramd` with config" $cfg
todo "Implement install-zdramd"
}

@ -2,4 +2,5 @@ let RUN_IN_CHROOT = true;
# Applies all system changes of `setup-root-user`
def main [cfg] {
echo "Executing up task `setup-root-user` with config" $cfg
todo "Implement setup-root-user"
}

@ -2,4 +2,5 @@ let RUN_IN_CHROOT = true;
# Applies all system changes of `setup-users`
def main [cfg] {
echo "Executing up task `setup-users` with config" $cfg
todo "Implement setup-users"
}

Loading…
Cancel
Save