aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2020-01-03 14:47:14 +0100
committerJybz <j.biernacki@free.fr>2020-01-03 14:47:14 +0100
commite05e98f7ea447a9e205ffcd1db7d93ccb8e57267 (patch)
tree6019bb924b428cc5b3ff69c00eb94382d0b06551
parent04ed6b37ee4bf1aa04c8eeb163a176f6e7195a1e (diff)
downloadmageia4arm-e05e98f7ea447a9e205ffcd1db7d93ccb8e57267.tar
mageia4arm-e05e98f7ea447a9e205ffcd1db7d93ccb8e57267.tar.gz
mageia4arm-e05e98f7ea447a9e205ffcd1db7d93ccb8e57267.tar.bz2
mageia4arm-e05e98f7ea447a9e205ffcd1db7d93ccb8e57267.tar.xz
mageia4arm-e05e98f7ea447a9e205ffcd1db7d93ccb8e57267.zip
Fix : no user password.
-rwxr-xr-xcreate_arm_img_urpmi.sh7
-rw-r--r--platforms/bananaPro/mageia4arm.cfg2
2 files changed, 7 insertions, 2 deletions
diff --git a/create_arm_img_urpmi.sh b/create_arm_img_urpmi.sh
index 6fa5f69..09bf4a7 100755
--- a/create_arm_img_urpmi.sh
+++ b/create_arm_img_urpmi.sh
@@ -240,7 +240,12 @@ function preparechroot()
fi
if [ -n "${ID_USER}" ]; then #If user ID defined, it will be setted at the end of the chroot of the second_stage_install.sh script
- echo -e " /sbin/useradd ${ID_USER}\n /bin/passwd ${ID_USER} << EOF\n${PASSWORD}\n${PASSWORD}\nEOF" >>"${BUILD_PATH}/second_stage_install.sh"
+ echo -e " /sbin/useradd ${ID_USER}\n" >>"${BUILD_PATH}/second_stage_install.sh"
+ if [ -n "${PASSWORD}" ]; then
+ echo -e " /bin/passwd ${ID_USER} << EOF\n${PASSWORD}\n${PASSWORD}\nEOF" >>"${BUILD_PATH}/second_stage_install.sh"
+ else
+ echo -e " /bin/passwd -d ${ID_USER}\n" >>"${BUILD_PATH}/second_stage_install.sh"
+ fi
else
info "No user defined, no user account created."
fi
diff --git a/platforms/bananaPro/mageia4arm.cfg b/platforms/bananaPro/mageia4arm.cfg
index b3c2e98..a9f9867 100644
--- a/platforms/bananaPro/mageia4arm.cfg
+++ b/platforms/bananaPro/mageia4arm.cfg
@@ -55,7 +55,7 @@ ROOT="/mnt/root"
# Default user
# If not set, no user will be defined.
-# ID_USER="banana"
+ID_USER="banana"
# PASSWORD="bananaPro"
#root password