FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

LinkBack Thread Tools
Old 05-23-2012, 07:32 PM
Will Woods
Default Fix unpack_updates_img argument handling (#811979)

unpack_updates_img takes one or two arguments - the image (required),
and the output dir (optional, defaults to "/updates").

That should be: outdir="${2:-/updates}"
Instead we had: outdir="${2:+/updates}"

Which means "outdir is empty unless $2 is set, then it's /updates".
Definitely not what we wanted.
dracut/anaconda-lib.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dracut/anaconda-lib.sh b/dracut/anaconda-lib.sh
index a045bab..212e6b7 100755
--- a/dracut/anaconda-lib.sh
+++ b/dracut/anaconda-lib.sh
@@ -100,7 +100,7 @@ anaconda_auto_updates() {

# Unpack an image into the given dir.
unpack_updates_img() {
- local img="$1" tmpdir="/tmp/${1##*/}.$$" outdir="${2:+/updates}"
+ local img="$1" tmpdir="/tmp/${1##*/}.$$" outdir="${2:-/updates}"
# NOTE: unpack_img $img $outdir can clobber existing subdirs in $outdir,
# which is why we use a tmpdir and copytree (which doesn't clobber)
unpack_img $img $tmpdir

Anaconda-devel-list mailing list

Thread Tools

All times are GMT. The time now is 09:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org