Merge lp:~clint-fewbar/ubuntu/natty/squid/postinst-using-invoke-rc.d into lp:ubuntu/natty/squid

Proposed by Clint Byrum on 2011-03-08
Status: Merged
Merged at revision: 59
Proposed branch: lp:~clint-fewbar/ubuntu/natty/squid/postinst-using-invoke-rc.d
Merge into: lp:ubuntu/natty/squid
Diff against target: 43 lines (+12/-8)
2 files modified
debian/changelog (+7/-0)
debian/postinst (+5/-8)
To merge this branch: bzr merge lp:~clint-fewbar/ubuntu/natty/squid/postinst-using-invoke-rc.d
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Team 2011-03-08 Pending
Review via email: mp+52559@code.launchpad.net

Description of the change

Changes postinst to call invoke-rc.d instead of 'restart', and uses stop/start to deal with the fact that restart does not reload the job config file.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-02-24 15:58:19 +0000
3+++ debian/changelog 2011-03-08 14:02:55 +0000
4@@ -1,3 +1,10 @@
5+squid (2.7.STABLE9-2.1ubuntu4) UNRELEASED; urgency=low
6+
7+ * Simplify postinst script and use invoke-rc.d per policy. Also use
8+ stop/start to make sure new job file is reloaded. (LP: #726348).
9+
10+ -- Clint Byrum <clint@ubuntu.com> Tue, 08 Mar 2011 05:19:18 -0800
11+
12 squid (2.7.STABLE9-2.1ubuntu3) natty; urgency=low
13
14 * Detect and deal with the situation where upstart has lost track of
15
16=== modified file 'debian/postinst'
17--- debian/postinst 2010-09-22 13:02:47 +0000
18+++ debian/postinst 2011-03-08 14:02:55 +0000
19@@ -183,20 +183,17 @@
20
21 cd /
22
23-if status squid | grep "start/running" > /dev/null; then
24- restart squid
25-else
26- start squid
27-fi
28-
29 if [ "$FIXLINES" = "false" ]; then
30 echo "squid.conf contains 2.2.5 syntax - cache_dir directive - not starting "
31 echo "Run 'dpkg-reconfigure -plow squid' to fix this automatically,"
32 echo "or fix the 'cache_dir'-entry in your squid.conf manually."
33 echo "See documentation in /usr/share/doc/squid for nearer instructions."
34 else
35- if status squid | grep "start/running" > /dev/null; then
36- restart squid
37+ if [ -e "/etc/init/squid.conf" ] ; then
38+ # Using stop/start because restart fails to reload the upstart job
39+ # file. See LP: #707479.
40+ invoke-rc.d squid stop || :
41+ invoke-rc.d squid start
42 fi
43 fi
44

Subscribers

People subscribed via source and target branches

to all changes: