2014-11-04 05:53:36 +01:00
|
|
|
#!/bin/bash
|
2014-09-29 05:03:25 +02:00
|
|
|
|
2014-11-04 05:53:36 +01:00
|
|
|
if [ "$0" == configure ]; then
|
|
|
|
# ensure that hostname resolves to 127.0.1.1 resp. ::1 and that /etc/hosts is
|
|
|
|
# in the form expected by qubes-sysinit.sh
|
|
|
|
for ip in '127\.0\.1\.1' '::1'; do
|
|
|
|
if grep -q "^${ip}\(\s\|$\)" /etc/hosts; then
|
|
|
|
sed -i "/^${ip}\s/,+0s/\(\s`hostname`\)\+\(\s\|$\)/\2/g" /etc/hosts
|
|
|
|
sed -i "s/^${ip}\(\s\|$\).*$/\0 `hostname`/" /etc/hosts
|
|
|
|
else
|
|
|
|
echo "${ip} `hostname`" >> /etc/hosts
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
# remove hostname from 127.0.0.1 line (in debian the hostname is by default
|
|
|
|
# resolved to 127.0.1.1)
|
|
|
|
sed -i "/^127\.0\.0\.1\s/,+0s/\(\s`hostname`\)\+\(\s\|$\)/\2/g" /etc/hosts
|
|
|
|
|
|
|
|
chown user:user /home_volatile/user
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Updating Qubes AppMenu."
|
|
|
|
/usr/lib/qubes/qubes-trigger-sync-appmenus.sh
|
2014-10-01 03:45:03 +02:00
|
|
|
|
2014-09-29 05:03:25 +02:00
|
|
|
#DEBHELPER#
|