Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / var / lib / dpkg / info / | server ip : 172.67.156.115 your ip : 172.69.6.188 H O M E |
Filename | /var/lib/dpkg/info/resolvconf.preinst |
Size | 2.52 kb |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 09:50 |
Last modified | 19-Jan-2013 00:58 |
Last accessed | 06-Jul-2025 22:04 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/bin/sh
set -e
MYNAME=resolvconf.preinst
report() { echo "${MYNAME}: $*" ; }
report_warn() { report "Warning: $*" >&2 ; }
report_info() { report "$*" >&2 ; }
is_installed() {
# Same function in preinst, postinst, postrm
[ "$1" ] || return 1
dpkg-query -W -f='${Status}\n' "$1" 2>/dev/null | grep -siq '^[[:alpha:]]\+ [[:alpha:]]\+ installed$' >/dev/null 2>&1
}
### Create run-time directories ###
#
# We create the run-time directories here, in the preinst, so that even if
# resolvconf is run before the postinst runs there is nevertheless a place
# for resolvconf to store data. The latter can occur if resolvconf
# is installed simultaneously with a caching nameserver package whose
# postinst runs resolvconf to add its IP address.
#
case "$1" in
install|upgrade)
# Ensure that /run/resolvconf/interface exists.
mkdir -p /run/resolvconf/interface
# Ensure that /etc/resolvconf exists.
mkdir -p /etc/resolvconf
;;
# abort-upgrade)
# Don't do anything because we don't anything in the postrm on upgrade or on failed-upgrade
# ;;
esac
### Prepare to notify already configured packages of our installation ###
case "$1" in
install)
# Create list of packages that might need to be notified of the installation of resolvconf
if [ -d /usr/lib/resolvconf/dpkg-event.d ] ; then
NOTIFICATION_HOOK_SCRIPTS="$(cd /usr/lib/resolvconf/dpkg-event.d >/dev/null ; run-parts --test .)"
PACKAGES_TO_NOTIFY=""
for SCRPT in $NOTIFICATION_HOOK_SCRIPTS ; do
PKG="${SCRPT#./}"
if is_installed "$PKG" ; then
PACKAGES_TO_NOTIFY="${PACKAGES_TO_NOTIFY:+$PACKAGES_TO_NOTIFY }$PKG"
fi
done
rm -f /run/resolvconf/packages-to-notify
if [ "$PACKAGES_TO_NOTIFY" ] ; then
echo "$PACKAGES_TO_NOTIFY" > /run/resolvconf/packages-to-notify
fi
fi
;;
# upgrade)
# Don't do anything
# ;;
# abort-upgrade)
# Don't do anything because we don't anything in the postrm on upgrade or on failed-upgrade
# ;;
esac
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/resolvconf" ] && [ ! -L "/etc/init.d/resolvconf" ]; then
if [ "`md5sum \"/etc/init.d/resolvconf\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' resolvconf | sed -n -e \"\\\\' /etc/init.d/resolvconf '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/resolvconf has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/resolvconf" "/etc/init.d/resolvconf.dpkg-bak"
else
rm -f "/etc/init.d/resolvconf"
fi
fi
fi
# End automatically added section
exit 0
set -e
MYNAME=resolvconf.preinst
report() { echo "${MYNAME}: $*" ; }
report_warn() { report "Warning: $*" >&2 ; }
report_info() { report "$*" >&2 ; }
is_installed() {
# Same function in preinst, postinst, postrm
[ "$1" ] || return 1
dpkg-query -W -f='${Status}\n' "$1" 2>/dev/null | grep -siq '^[[:alpha:]]\+ [[:alpha:]]\+ installed$' >/dev/null 2>&1
}
### Create run-time directories ###
#
# We create the run-time directories here, in the preinst, so that even if
# resolvconf is run before the postinst runs there is nevertheless a place
# for resolvconf to store data. The latter can occur if resolvconf
# is installed simultaneously with a caching nameserver package whose
# postinst runs resolvconf to add its IP address.
#
case "$1" in
install|upgrade)
# Ensure that /run/resolvconf/interface exists.
mkdir -p /run/resolvconf/interface
# Ensure that /etc/resolvconf exists.
mkdir -p /etc/resolvconf
;;
# abort-upgrade)
# Don't do anything because we don't anything in the postrm on upgrade or on failed-upgrade
# ;;
esac
### Prepare to notify already configured packages of our installation ###
case "$1" in
install)
# Create list of packages that might need to be notified of the installation of resolvconf
if [ -d /usr/lib/resolvconf/dpkg-event.d ] ; then
NOTIFICATION_HOOK_SCRIPTS="$(cd /usr/lib/resolvconf/dpkg-event.d >/dev/null ; run-parts --test .)"
PACKAGES_TO_NOTIFY=""
for SCRPT in $NOTIFICATION_HOOK_SCRIPTS ; do
PKG="${SCRPT#./}"
if is_installed "$PKG" ; then
PACKAGES_TO_NOTIFY="${PACKAGES_TO_NOTIFY:+$PACKAGES_TO_NOTIFY }$PKG"
fi
done
rm -f /run/resolvconf/packages-to-notify
if [ "$PACKAGES_TO_NOTIFY" ] ; then
echo "$PACKAGES_TO_NOTIFY" > /run/resolvconf/packages-to-notify
fi
fi
;;
# upgrade)
# Don't do anything
# ;;
# abort-upgrade)
# Don't do anything because we don't anything in the postrm on upgrade or on failed-upgrade
# ;;
esac
# Automatically added by dh_installinit
if [ "$1" = install ] || [ "$1" = upgrade ]; then
if [ -e "/etc/init.d/resolvconf" ] && [ ! -L "/etc/init.d/resolvconf" ]; then
if [ "`md5sum \"/etc/init.d/resolvconf\" | sed -e \"s/ .*//\"`" != \
"`dpkg-query -W -f='${Conffiles}' resolvconf | sed -n -e \"\\\\' /etc/init.d/resolvconf '{s/ obsolete$//;s/.* //p}\"`" ]
then
echo "Obsolete conffile /etc/init.d/resolvconf has been modified by you, renaming to .dpkg-bak"
mv -f "/etc/init.d/resolvconf" "/etc/init.d/resolvconf.dpkg-bak"
else
rm -f "/etc/init.d/resolvconf"
fi
fi
fi
# End automatically added section
exit 0