potential problems when iso filename contains more dots

Bug #508210 reported by Claude Heiland-Allen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bouilloncube
Fix Committed
High
danstowell

Bug Description

http://bazaar.launchpad.net/~puredyne-team/bouilloncube/devel/annotate/head%3A/sh/make-live-device.sh#L52

if [ `echo $1 | cut -d . -f 2` == "iso" ] ; then

will break if/when iso filename contains more than one '.'

Revision history for this message
danstowell (danstowell) wrote :

I thought I'd be safe from this but then...

$ sudo ./make-live-device.sh ../../puredyne-910-carrot_and_coriander-CD.iso /dev/sdb
[sudo] password for dan:
[?] Are you sure your target is /dev/sdb ? (y/n)y
./make-live-device.sh: line 52: [: ==: unary operator expected
[!] Wrong source. Please either specify an ISO file or use 'live' to use the current live system as source.

I've committed a fix (rev #51) which uses a bash syntax for directly getting the file extension.

Changed in bouilloncube:
importance: Undecided → High
assignee: nobody → danstowell (danstowell)
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.