fixes: root password contains special characters

This commit is contained in:
Wenkai Yin 2016-12-05 12:16:27 +08:00
parent 01dc77b606
commit 65a2c87a7c
3 changed files with 5 additions and 5 deletions

View File

@ -157,7 +157,7 @@ fi
if [ -n "$hostname" ] if [ -n "$hostname" ]
then then
echo "Hostname: $hostname" echo "Hostname: $hostname"
configureHarborCfg hostname $hostname configureHarborCfg "hostname" "$hostname"
else else
echo "Failed to get the hostname" echo "Failed to get the hostname"
exit 1 exit 1

View File

@ -13,7 +13,7 @@ value=$(ovfenv -k root_pwd)
if [ -n "$value" ] if [ -n "$value" ]
then then
echo "Resetting root password..." echo "Resetting root password..."
printf "$value\n$value\n" | passwd root printf "%s\n%s\n" "$value" "$value" | passwd root
fi fi
#configure SSH #configure SSH

View File

@ -9,7 +9,7 @@ echo "Read attribute using ovfenv: [ auth_mode ]"
auth_mode=$(ovfenv -k auth_mode) auth_mode=$(ovfenv -k auth_mode)
if [ -n "$auth_mode" ] if [ -n "$auth_mode" ]
then then
configureHarborCfg auth_mode $auth_mode configureHarborCfg "auth_mode" "$auth_mode"
fi fi
#Configure password of Harbor administrator #Configure password of Harbor administrator
@ -17,7 +17,7 @@ echo "Read attribute using ovfenv: [ harbor_admin_password ]"
adm_pwd=$(ovfenv -k harbor_admin_password) adm_pwd=$(ovfenv -k harbor_admin_password)
if [ -n "$adm_pwd" ] if [ -n "$adm_pwd" ]
then then
configureHarborCfg harbor_admin_password $adm_pwd configureHarborCfg "harbor_admin_password" "$adm_pwd"
fi fi
#Configure password of database #Configure password of database
@ -25,7 +25,7 @@ echo "Read attribute using ovfenv: [ db_password ]"
db_pwd=$(ovfenv -k db_password) db_pwd=$(ovfenv -k db_password)
if [ -n "$db_pwd" ] if [ -n "$db_pwd" ]
then then
configureHarborCfg db_password $db_pwd configureHarborCfg "db_password" "$db_pwd"
fi fi
#Configure other attrs #Configure other attrs