From 13d5dda5cf19442e8121f59b61f92d1e91ec21ec Mon Sep 17 00:00:00 2001 From: Marcel <mk@freeshell.de> Date: Mon, 8 Jul 2019 00:57:29 +0200 Subject: [PATCH] - In case of a geli encrypted /home move /mnt/private/home to /mnt/home to prevent problems with symlinks. - Remove geli related entries from rc.conf --- config/usr/libexec/nomadbsd-install | 12 ++++++------ config/usr/libexec/nomadbsd-install.mac | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/config/usr/libexec/nomadbsd-install b/config/usr/libexec/nomadbsd-install index b12dce5d..61336e53 100755 --- a/config/usr/libexec/nomadbsd-install +++ b/config/usr/libexec/nomadbsd-install @@ -207,7 +207,12 @@ commit() { sed -i .bak -E "s/[[:<:]]nomad[[:>:]]/${username}/g" /mnt/etc/master.passwd sed -i .bak -E "s/[[:<:]]nomad[[:>:]]/${username}/g" /mnt/etc/group sed -i .bak -E "/^default_user/d" /mnt/usr/local/etc/slim.conf - + sed -i .bak -E '/^geli.*/d' /mnt/etc/rc.conf + if [ -L /mnt/home -a -d /mnt/private/home/nomad ]; then + unlink /mnt/home + mv /mnt/private/home /mnt + rmdir /mnt/private + fi status "Counting config files ..." progress -1 nfiles=$(find /mnt/home/nomad/ -type f -exec file {} \; | grep text | wc -l) @@ -225,11 +230,6 @@ commit() { rm -f /mnt/usr/libexec/nomad* status "Moving /mnt/home/nomad to /mnt/home/$username ..." mv /mnt/home/nomad /mnt/home/${username} - if [ -L /mnt/home -a -d /mnt/private/home/${username} ]; then - unlink /mnt/home - mv /mnt/private/home /mnt - rmdir /mnt/private - fi status "Running pwd_mkdb on /etc/master.passwd ..." chroot /mnt sh -c '/usr/sbin/pwd_mkdb -p /etc/master.passwd' status "Unmounting /mnt ..." diff --git a/config/usr/libexec/nomadbsd-install.mac b/config/usr/libexec/nomadbsd-install.mac index 0bfbe70c..c9733a56 100755 --- a/config/usr/libexec/nomadbsd-install.mac +++ b/config/usr/libexec/nomadbsd-install.mac @@ -191,7 +191,12 @@ commit() { sed -i .bak -E "s/[[:<:]]nomad[[:>:]]/${username}/g" /mnt/etc/master.passwd sed -i .bak -E "s/[[:<:]]nomad[[:>:]]/${username}/g" /mnt/etc/group sed -i .bak -E "/^default_user/d" /mnt/usr/local/etc/slim.conf - + sed -i .bak -E '/^geli.*/d' /mnt/etc/rc.conf + if [ -L /mnt/home -a -d /mnt/private/home/nomad ]; then + unlink /mnt/home + mv /mnt/private/home /mnt + rmdir /mnt/private + fi status "Counting config files ..." progress -1 nfiles=$(find /mnt/home/nomad/ -type f -exec file {} \; | grep text | wc -l) @@ -209,11 +214,6 @@ commit() { rm -f /mnt/usr/libexec/nomad* status "Moving /mnt/home/nomad to /mnt/home/$username ..." mv /mnt/home/nomad /mnt/home/${username} - if [ -L /mnt/home -a -d /mnt/private/home/${username} ]; then - unlink /mnt/home - mv /mnt/private/home /mnt - rmdir /mnt/private - fi status "Running pwd_mkdb on /etc/master.passwd ..." chroot /mnt sh -c '/usr/sbin/pwd_mkdb -p /etc/master.passwd' status "Unmounting /mnt ..." -- GitLab