summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-07-31 15:16:19 +0000
committerColin Watson <cjwatson@debian.org>2009-07-31 15:16:19 +0000
commitdc4cae7464efd7312ca29626efed55c3b26ecc62 (patch)
tree294305576b218ae7c27b9dba22c69fe731265572 /debian
parentac58d020d07f4a24409106429799d001590386b5 (diff)
Use 'which' rather than 'type' in maintainer scripts.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog1
-rw-r--r--debian/openssh-server.postinst2
-rw-r--r--debian/openssh-server.postrm2
-rw-r--r--debian/openssh-server.preinst2
4 files changed, 4 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index 826ac9296..9cc5ddd31 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,7 @@ openssh (1:5.1p1-7) UNRELEASED; urgency=low
5 * Set umask to 022 in the init script as well as postinsts (closes: 5 * Set umask to 022 in the init script as well as postinsts (closes:
6 #539030). 6 #539030).
7 * Add ${misc:Depends} to keep Lintian happy. 7 * Add ${misc:Depends} to keep Lintian happy.
8 * Use 'which' rather than 'type' in maintainer scripts.
8 9
9 -- Colin Watson <cjwatson@debian.org> Fri, 24 Jul 2009 18:43:45 +0100 10 -- Colin Watson <cjwatson@debian.org> Fri, 24 Jul 2009 18:43:45 +0100
10 11
diff --git a/debian/openssh-server.postinst b/debian/openssh-server.postinst
index b7ea210c4..e3558a8f5 100644
--- a/debian/openssh-server.postinst
+++ b/debian/openssh-server.postinst
@@ -163,7 +163,7 @@ create_key() {
163 echo -n $msg 163 echo -n $msg
164 ssh-keygen -q -f "$file" -N '' "$@" 164 ssh-keygen -q -f "$file" -N '' "$@"
165 echo 165 echo
166 if type restorecon >/dev/null 2>&1; then 166 if which restorecon >/dev/null 2>&1; then
167 restorecon "$file.pub" 167 restorecon "$file.pub"
168 fi 168 fi
169 fi 169 fi
diff --git a/debian/openssh-server.postrm b/debian/openssh-server.postrm
index 30682d6d0..7258d5f99 100644
--- a/debian/openssh-server.postrm
+++ b/debian/openssh-server.postrm
@@ -54,7 +54,7 @@ case $1 in
54 54
55 update-rc.d ssh remove >/dev/null 55 update-rc.d ssh remove >/dev/null
56 56
57 if type deluser >/dev/null 2>&1; then 57 if which deluser >/dev/null 2>&1; then
58 deluser --quiet sshd > /dev/null || true 58 deluser --quiet sshd > /dev/null || true
59 fi 59 fi
60 60
diff --git a/debian/openssh-server.preinst b/debian/openssh-server.preinst
index e6c150ba5..43c4b57f9 100644
--- a/debian/openssh-server.preinst
+++ b/debian/openssh-server.preinst
@@ -118,7 +118,7 @@ EOF
118 # case the key is encrypted, which we need to fix 118 # case the key is encrypted, which we need to fix
119 chmod 600 $key 119 chmod 600 $key
120 ssh-keygen -u -f $key >/dev/null 120 ssh-keygen -u -f $key >/dev/null
121 if type restorecon >/dev/null 2>&1; then 121 if which restorecon >/dev/null 2>&1; then
122 restorecon "$key.pub" 122 restorecon "$key.pub"
123 fi 123 fi
124 } 124 }