Merge lp:~broder/ubuntu/natty/casper/fix-671786 into lp:ubuntu/natty/casper

Proposed by Evan Broder
Status: Merged
Merged at revision: 844
Proposed branch: lp:~broder/ubuntu/natty/casper/fix-671786
Merge into: lp:ubuntu/natty/casper
Diff against target: 56 lines (+13/-4)
2 files modified
debian/changelog (+7/-0)
scripts/casper (+6/-4)
To merge this branch: bzr merge lp:~broder/ubuntu/natty/casper/fix-671786
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+40252@code.launchpad.net

Description of the change

The one thing I'm a little unsure of is the interaction between the uuid= and ignore_uuid options. Right now the last option wins, which I think is the most reasonable thing to do, but I could be convinced otherwise.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Thanks for your patch. This approach (on parameter ordering) seems natural enough to me.

review: Approve
Revision history for this message
Colin Watson (cjwatson) wrote :

The one extra thing I'm going to do is to add an item of documentation to debian/manpage/casper.7. (This hasn't been done consistently in the past, so I won't delay merging your branch on it.)

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 2010-10-05 04:35:47 +0000
3+++ debian/changelog 2010-11-06 10:24:51 +0000
4@@ -1,3 +1,10 @@
5+casper (1.249) natty; urgency=low
6+
7+ * scripts/casper: Check for uuid= command line parameter in addition to
8+ /conf/uuid.conf file in initrd. (LP: #671786)
9+
10+ -- Evan Broder <evan@ebroder.net> Sat, 06 Nov 2010 03:18:57 -0700
11+
12 casper (1.248) maverick; urgency=low
13
14 * ubiquity-hooks/30accessibility: Create .local/share subdirectory structure
15
16=== modified file 'scripts/casper' (properties changed: -x to +x)
17--- scripts/casper 2010-09-06 15:52:21 +0000
18+++ scripts/casper 2010-11-06 10:24:51 +0000
19@@ -6,6 +6,7 @@
20
21 mountpoint=/cdrom
22 LIVE_MEDIA_PATH=casper
23+[ -f /conf/uuid.conf ] && UUID="$(cat /conf/uuid.conf)"
24
25 root_persistence="casper-rw"
26 home_persistence="home-rw"
27@@ -48,8 +49,10 @@
28 STATICIP="frommedia"
29 fi
30 export STATICIP ;;
31+ uuid=*)
32+ UUID=${x#uuid=} ;;
33 ignore_uuid)
34- IGNORE_UUID="Yes" ;;
35+ UUID="" ;;
36 live-media-path=*)
37 LIVE_MEDIA_PATH="${x#live-media-path=}"
38 export LIVE_MEDIA_PATH
39@@ -78,15 +81,14 @@
40 }
41
42 matches_uuid() {
43- if [ "$IGNORE_UUID" ] || [ ! -e /conf/uuid.conf ]; then
44+ if [ -z "$UUID" ]; then
45 return 0
46 fi
47 path="$1"
48- uuid="$(cat /conf/uuid.conf)"
49 for try_uuid_file in "$path/.disk/casper-uuid"*; do
50 [ -e "$try_uuid_file" ] || continue
51 try_uuid="$(cat "$try_uuid_file")"
52- if [ "$uuid" = "$try_uuid" ]; then
53+ if [ "$UUID" = "$try_uuid" ]; then
54 return 0
55 fi
56 done

Subscribers

People subscribed via source and target branches

to all changes: