From 43cb466d536220df30524f221ff1fbc09a531d6c Mon Sep 17 00:00:00 2001 From: udeved Date: Thu, 8 Jun 2017 00:25:09 +0200 Subject: [PATCH] util-iso-chroot: move live conf to util-profile --- lib/util-iso-chroot.sh | 23 ----------------------- lib/util-profile.sh | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lib/util-iso-chroot.sh b/lib/util-iso-chroot.sh index 4341449..82390b0 100644 --- a/lib/util-iso-chroot.sh +++ b/lib/util-iso-chroot.sh @@ -123,29 +123,6 @@ configure_services(){ info "Done configuring [%s]" "${initsys}" } -write_live_session_conf(){ - local path=$1${SYSCONFDIR} - [[ ! -d $path ]] && mkdir -p $path - local conf=$path/live.conf - msg2 "Writing %s" "${conf##*/}" - echo '# live session configuration' > ${conf} - echo '' >> ${conf} - echo '# autologin' >> ${conf} - echo "autologin=${autologin}" >> ${conf} - echo '' >> ${conf} - echo '# login shell' >> ${conf} - echo "login_shell=${login_shell}" >> ${conf} - echo '' >> ${conf} - echo '# live username' >> ${conf} - echo "username=${username}" >> ${conf} - echo '' >> ${conf} - echo '# live password' >> ${conf} - echo "password=${password}" >> ${conf} - echo '' >> ${conf} - echo '# live group membership' >> ${conf} - echo "addgroups='${addgroups}'" >> ${conf} -} - configure_system(){ local mnt="$1" case ${initsys} in diff --git a/lib/util-profile.sh b/lib/util-profile.sh index 047ea4e..eadc7d0 100644 --- a/lib/util-profile.sh +++ b/lib/util-profile.sh @@ -144,6 +144,29 @@ reset_profile(){ unset live_overlay } +write_live_session_conf(){ + local path=$1${SYSCONFDIR} + prepare_dir "$path" + local conf=$path/live.conf + msg2 "Writing %s" "${conf##*/}" + echo '# live session configuration' > ${conf} + echo '' >> ${conf} + echo '# autologin' >> ${conf} + echo "autologin=${autologin}" >> ${conf} + echo '' >> ${conf} + echo '# login shell' >> ${conf} + echo "login_shell=${login_shell}" >> ${conf} + echo '' >> ${conf} + echo '# live username' >> ${conf} + echo "username=${username}" >> ${conf} + echo '' >> ${conf} + echo '# live password' >> ${conf} + echo "password=${password}" >> ${conf} + echo '' >> ${conf} + echo '# live group membership' >> ${conf} + echo "addgroups='${addgroups}'" >> ${conf} +} + # $1: file name load_pkgs(){ local pkglist="$1" arch="$2" ed="$3" init="$4" _kv="$5"