File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ if [ "$1" = configure ]; then
2020 if ! getent passwd cloud > /dev/null; then
2121 adduser --quiet --system --group --no-create-home --home /var/lib/cloudstack/management cloud
2222 else
23- usermod -m -d /var/lib/cloudstack/management cloud
23+ usermod -m -d /var/lib/cloudstack/management cloud || true
2424 fi
2525
2626 for i in /var/cache/cloudstack/management \
@@ -36,6 +36,20 @@ if [ "$1" = configure ]; then
3636 chgrp cloud $i
3737 done
3838
39+ OLDCONFDIR=" /etc/cloud/management"
40+ NEWCONFDIR=" /etc/cloudstack/management"
41+ CONFFILES=" db.properties db-enc.properties cloud.keystore key"
42+
43+ # Copy old configuration so the admin doesn't have to do that
44+ # Only do so when we are installing for the first time
45+ if [ -z " $2 " ]; then
46+ for FILE in $CONFFILES ; do
47+ if [ -f " $OLDCONFDIR /${FILE} " ]; then
48+ cp -a $OLDCONFDIR /$FILE $NEWCONFDIR /$FILE
49+ fi
50+ done
51+ fi
52+
3953 chmod 0640 /etc/cloudstack/management/db.properties
4054 chgrp cloud /etc/cloudstack/management/db.properties
4155fi
You can’t perform that action at this time.
0 commit comments