aboutsummaryrefslogtreecommitdiffstats
path: root/create_arm_img_urpmi.sh
diff options
context:
space:
mode:
Diffstat (limited to 'create_arm_img_urpmi.sh')
-rwxr-xr-xcreate_arm_img_urpmi.sh7
1 files changed, 6 insertions, 1 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