create live home

pull/6/head
artoo 2 years ago
parent 07a7c70994
commit 85a7bf5f9e
  1. 3
      bin/artix-live.in
  2. 18
      lib/util-live.sh

@ -15,9 +15,6 @@ echo "Activated swap and added to fstab" >> "${LOGFILE}"
configure_language
echo "Finished localization" >> "${LOGFILE}"
configure_user 'root'
echo "Configured root user" >> "${LOGFILE}"
configure_user
echo "Configured live user $user with password ${PASSWORD}" >> "${LOGFILE}"

@ -223,14 +223,16 @@ configure_branding(){
}
configure_user(){
local user="${1:-artix}"
case "$user" in
root)
echo "root:${PASSWORD}" | chroot / chpasswd
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /root/
;;
*) echo "$user:${PASSWORD}" | chroot / chpasswd ;;
esac
local user=root
echo "$user:${PASSWORD}" | chroot / chpasswd
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /$user/
user=artix
mkdir /home/$user
chown $user:$user /home/$user
echo "$user:${PASSWORD}" | chroot / chpasswd
cp /etc/skel/.{bash_profile,bashrc,bash_logout} /home/$user
chown -R $user:$user /home/$user
}
# }}}

Loading…
Cancel
Save