Package: eucalyptus-nc
Version: 1.6.2
Severity: normal
This following has some problems, see the # lines
if [ "$1" = "configure" ]
then
adduser eucalyptus libvirtd 2>&1 > /dev/null || true
adduser eucalyptus libvirt 2>&1 > /dev/null || true
EUCA_HOME=`getent passwd eucalyptus | cut -f6 -d:`
# It should be checked if [ -z "$EUCA_HOME" ]
# and the script should fail if not
if ! [ -d "$EUCA_HOME/.ssh" ]
then
mkdir -p "$EUCA_HOME/.ssh"
fi
if ! [ -f "$EUCA_HOME/.ssh/authorized_keys" ]
then
touch "$EUCA_HOME/.ssh/authorized_keys" || true
fi
chown -R eucalyptus:eucalyptus /var/lib/eucalyptus/.ssh || true
# This should most likely be $EUCA_HOME, not /var/lib/eucalyptus
update-rc.d eucalyptus-nc start 99 2 3 4 5 . stop 20 0 1 6 . >/dev/null
# The stopping should be performed when the current package is removed,
# but I don't really mind this here...
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d eucalyptus-nc stop > /dev/null 2>&1 ||true
else
/etc/init.d/eucalyptus-nc stop > /dev/null 2>&1 ||true
fi
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d eucalyptus-nc start ||true
else
/etc/init.d/eucalyptus-nc start ||true
fi
fi
Some expert in postinst scripts please help.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]