From f53297b89ffe1cac19cbaf7339492a760f45bb5a Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Wed, 26 Aug 2009 14:31:29 -0700 Subject: Clean up the libpam0g postinst a bit; invoke-rc.d has been a guaranteed interface for two stable release cycles now --- debian/changelog | 2 ++ debian/libpam0g.postinst | 25 ++++--------------------- 2 files changed, 6 insertions(+), 21 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 4826ed6c..bdd80f97 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ pam (1.1.0-2) UNRELEASED; urgency=low guarantees that we have pam_unix available for use by pam-auth-update. * Use /bin/sh instead of /bin/bash for libpam0g.postinst, since we've confirmed there are no longer any bashisms there. Closes: #519973. + * Clean up the libpam0g postinst a bit; invoke-rc.d has been a guaranteed + interface for two stable release cycles now -- Steve Langasek Wed, 26 Aug 2009 09:23:57 -0700 diff --git a/debian/libpam0g.postinst b/debian/libpam0g.postinst index 04d91b9e..3cbbb994 100644 --- a/debian/libpam0g.postinst +++ b/debian/libpam0g.postinst @@ -72,22 +72,11 @@ installed_services() { ) for service in $check; do - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - idl=$(ls /etc/init.d/${service} 2> /dev/null | head -n 1) - if [ -n "$idl" ] && [ -x $idl ]; then + idl="/etc/init.d/${service}" + if [ -n "$idl" ] && [ -x $idl ]; then services="$service $services" - else - echo "WARNING: init script for $service not found." >&2 - fi else - if [ -f /usr/share/file-rc/rc ] || [ -f /usr/lib/file-rc/rc ] && [ -f /etc/runlevel.conf ]; then - idl=$(filerc $rl $service) - else - idl=$(ls /etc/rc${rl}.d/S??${service} 2> /dev/null | head -n 1) - fi - if [ -n "$idl" ] && [ -x $idl ]; then - services="$service $services" - fi + echo "WARNING: init script for $service not found." >&2 fi done echo "$services" @@ -140,13 +129,7 @@ then failed="" rl=$(runlevel | sed 's/.*\ //') for service in $services; do - if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then - idl="invoke-rc.d ${service}" - elif [ -f /usr/share/file-rc/rc ] || [ -f /usr/lib/file-rc/rc ] && [ -f /etc/runlevel.conf ]; then - idl=$(filerc $rl $service) - else - idl=$(ls /etc/rc${rl}.d/S??${service} 2> /dev/null | head -n 1) - fi + idl="invoke-rc.d ${service}" case "$service" in gdm) -- cgit v1.2.3