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

Proposed by Clint Byrum
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 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
=== modified file 'debian/changelog'
--- debian/changelog 2011-02-24 15:58:19 +0000
+++ debian/changelog 2011-03-08 14:02:55 +0000
@@ -1,3 +1,10 @@
1squid (2.7.STABLE9-2.1ubuntu4) UNRELEASED; urgency=low
2
3 * Simplify postinst script and use invoke-rc.d per policy. Also use
4 stop/start to make sure new job file is reloaded. (LP: #726348).
5
6 -- Clint Byrum <clint@ubuntu.com> Tue, 08 Mar 2011 05:19:18 -0800
7
1squid (2.7.STABLE9-2.1ubuntu3) natty; urgency=low8squid (2.7.STABLE9-2.1ubuntu3) natty; urgency=low
29
3 * Detect and deal with the situation where upstart has lost track of10 * Detect and deal with the situation where upstart has lost track of
411
=== modified file 'debian/postinst'
--- debian/postinst 2010-09-22 13:02:47 +0000
+++ debian/postinst 2011-03-08 14:02:55 +0000
@@ -183,20 +183,17 @@
183183
184cd /184cd /
185185
186if status squid | grep "start/running" > /dev/null; then
187 restart squid
188else
189 start squid
190fi
191
192if [ "$FIXLINES" = "false" ]; then186if [ "$FIXLINES" = "false" ]; then
193 echo "squid.conf contains 2.2.5 syntax - cache_dir directive - not starting "187 echo "squid.conf contains 2.2.5 syntax - cache_dir directive - not starting "
194 echo "Run 'dpkg-reconfigure -plow squid' to fix this automatically," 188 echo "Run 'dpkg-reconfigure -plow squid' to fix this automatically,"
195 echo "or fix the 'cache_dir'-entry in your squid.conf manually." 189 echo "or fix the 'cache_dir'-entry in your squid.conf manually."
196 echo "See documentation in /usr/share/doc/squid for nearer instructions."190 echo "See documentation in /usr/share/doc/squid for nearer instructions."
197else191else
198 if status squid | grep "start/running" > /dev/null; then192 if [ -e "/etc/init/squid.conf" ] ; then
199 restart squid193 # Using stop/start because restart fails to reload the upstart job
194 # file. See LP: #707479.
195 invoke-rc.d squid stop || :
196 invoke-rc.d squid start
200 fi197 fi
201fi198fi
202199

Subscribers

People subscribed via source and target branches

to all changes: