diff options
-rwxr-xr-x | create_arm_img_urpmi.sh | 7 | ||||
-rw-r--r-- | platforms/bananaPro/mageia4arm.cfg | 2 |
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 |