if rpm -qa | grep --quiet --perl-regexp '^cloud-init-\d' ; then
exec_cmd ${tool} --assumeyes erase cloud-init
RM -rf /etc/sysconfig/network-scripts/* /etc/sysconfig/network-scripts/.*
+ sleep 1
fi
for logfile in /var/log/cloud-init.log /var/log/cloud-init-output.log ; do
RM "${logfile}}"
done
+ if getent passwd cloud-user >/dev/null; then
+ info "Removing user 'cloud-user' ..."
+ exec_cmd userdel -r cloud-user
+ sleep 1
+ fi
+
+ if getent group cloud-user >/dev/null; then
+ info "Removing group 'cloud-user' ..."
+ exec_cmd groupdel cloud-user
+ sleep 1
+ fi
+
echo
info "Doing upgrade ..."
exec_cmd ${tool} --assumeyes upgrade