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" ]
then
echo "Hostname: $hostname"
configureHarborCfg hostname $hostname
configureHarborCfg "hostname" "$hostname"
else
echo "Failed to get the hostname"
exit 1

View File

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

View File

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