Merge lp:~ssalley/ubuntu/natty/likewise-open/likewise-open-fix-751807 into lp:ubuntu/natty/likewise-open

Proposed by Scott Salley
Status: Merged
Merged at revision: 26
Proposed branch: lp:~ssalley/ubuntu/natty/likewise-open/likewise-open-fix-751807
Merge into: lp:ubuntu/natty/likewise-open
Diff against target: 45 lines (+28/-0)
2 files modified
debian/changelog (+6/-0)
debian/likewise-open.preinst (+22/-0)
To merge this branch: bzr merge lp:~ssalley/ubuntu/natty/likewise-open/likewise-open-fix-751807
Reviewer Review Type Date Requested Status
Dustin Kirkland  Approve
Ubuntu branches Pending
Review via email: mp+56620@code.launchpad.net

Description of the change

No code was changed, just the preinst script.

This change corrects the likewise-open.preinst script to shutdown the daemons in Likewise Open 5.4 on upgrade. Somehow I missed the fact that much of the upgrade related code was not being called for upgrades from Likweise Open 5.4 -- probably because the only real task from upgrading from 5.4 is to make sure 5.4 is shutdown cleanly.

Test by installing likewise-open in Ubuntu 10.10 and upgrading to Natty.

For expediency in testing, I put a 'hold' on likewise-open in Ubuntu 10.10, did a Natty upgrade, and then took a snapshot of my VM. I then tested the likewise-open package I built by starting the snapshot and installing with dpkg. Anyone see a problem with doing an upgrade test like this?

To post a comment you must log in.
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Scott,

I'm going to approve/merge this for Natty.

However, calling /etc/init.d/* directly from preinst/postinst scripts is not recommended.

Instead, you're supposed to use update-rc.d. See the Debian Policy Manual, section 9.3.3:
 * http://www.debian.org/doc/debian-policy/ch-opersys.html

Grepping through your debian directory, I see ~30 or so "violations", so I accepted your merge proposal as-is, in the interest of consistency.

I would recommend taking a look at this in depth for a future release (after Natty). Ping me in IRC if you have more questions!

Thanks!

review: Approve

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-03-21 19:28:39 +0000
3+++ debian/changelog 2011-04-06 17:29:25 +0000
4@@ -1,3 +1,9 @@
5+likewise-open (6.0.0.53010-4ubuntu4) natty; urgency=low
6+
7+ * debian/likewise-open.preinst now stops daemons during upgrade (LP: #751807)
8+
9+ -- Scott Salley <ssalley@likewise.com> Tue, 5 Apr 2011 13:52:58 -0800
10+
11 likewise-open (6.0.0.53010-4ubuntu3) natty; urgency=low
12
13 * remove stale pid files during installation and daemon exit. (LP: #737362)
14
15=== modified file 'debian/likewise-open.preinst'
16--- debian/likewise-open.preinst 2011-03-21 19:28:39 +0000
17+++ debian/likewise-open.preinst 2011-04-06 17:29:25 +0000
18@@ -190,6 +190,28 @@
19 # from 5.0
20 rm_conffile /etc/init.d/npcmuxd
21 fi
22+
23+ if dpkg --compare-versions "$2" lt-nl "6.0.0"; then
24+ # Shutdown old daemons nicely
25+ if [ -f /etc/init.d/lsassd ]
26+ then
27+ exec_log "/etc/init.d/lsassd stop"
28+ fi
29+
30+ for daemon in $DAEMONS_TO_HALT
31+ do
32+ if [ -x /etc/init.d/$daemon ]; then
33+ exec_logfile "/etc/init.d/$daemon stop"
34+ fi
35+ exec_logfile "pkill -TERM -x $daemon"
36+ exec_logfile "pkill -KILL -x $daemon"
37+ exec_logfile "rm -f /var/run/$daemon.pid"
38+ done
39+
40+ logfile "Snapshot of processes after stopping daemons"
41+ exec_logfile "ps ax"
42+
43+ fi
44 return 0
45 ;;
46

Subscribers

People subscribed via source and target branches

to all changes: