* [PATCH 1/2] apply-live-updates.sh: copy without glob
@ 2011-10-20 17:57 Will Woods
[not found] ` <1319133444-27980-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Will Woods @ 2011-10-20 17:57 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
cp $SRC/* $DEST will skip dotfiles in $SRC.
( cd $SRC; cp -a -t $DEST . ) will copy everything.
---
modules.d/90dmsquash-live/apply-live-updates.sh | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh
index dfdb404..8dce5d4 100755
--- a/modules.d/90dmsquash-live/apply-live-updates.sh
+++ b/modules.d/90dmsquash-live/apply-live-updates.sh
@@ -1,7 +1,8 @@
#!/bin/sh
if [ -b /dev/mapper/live-rw ]; then
- if [ "`echo /updates/*`" != "/updates/*" ]; then
+ if pushd /updates &>/dev/null; then
echo "Applying updates to live image..."
- /bin/cp -a /updates/* $NEWROOT
+ /bin/cp -a -t $NEWROOT .
+ popd &>/dev/null
fi
fi
--
1.7.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] make livenet module optional
[not found] ` <1319133444-27980-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2011-10-20 17:57 ` Will Woods
[not found] ` <1319133444-27980-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-10-21 11:18 ` [PATCH 1/2] apply-live-updates.sh: copy without glob Harald Hoyer
1 sibling, 1 reply; 4+ messages in thread
From: Will Woods @ 2011-10-20 17:57 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA
The livenet module was intended to be optional, so its check() function
in module-setup.sh should return 255, not 0.
This was causing systems without 'wget' to fail to build initramfs, as
in RHBZ#747632.
---
modules.d/90livenet/module-setup.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules.d/90livenet/module-setup.sh b/modules.d/90livenet/module-setup.sh
index 3ee7521..613a225 100755
--- a/modules.d/90livenet/module-setup.sh
+++ b/modules.d/90livenet/module-setup.sh
@@ -5,7 +5,7 @@ check() {
# a live, host-only image doesn't really make a lot of sense
[[ $hostonly ]] && return 1
command -v wget || return 1
- return 0
+ return 255
}
depends() {
--
1.7.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] make livenet module optional
[not found] ` <1319133444-27980-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2011-10-21 11:16 ` Harald Hoyer
0 siblings, 0 replies; 4+ messages in thread
From: Harald Hoyer @ 2011-10-21 11:16 UTC (permalink / raw)
To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 20.10.2011 19:57, Will Woods wrote:
> The livenet module was intended to be optional, so its check() function
> in module-setup.sh should return 255, not 0.
>
> This was causing systems without 'wget' to fail to build initramfs, as
> in RHBZ#747632.
> ---
> modules.d/90livenet/module-setup.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/modules.d/90livenet/module-setup.sh b/modules.d/90livenet/module-setup.sh
> index 3ee7521..613a225 100755
> --- a/modules.d/90livenet/module-setup.sh
> +++ b/modules.d/90livenet/module-setup.sh
> @@ -5,7 +5,7 @@ check() {
> # a live, host-only image doesn't really make a lot of sense
> [[ $hostonly ]] && return 1
> command -v wget || return 1
> - return 0
> + return 255
> }
>
> depends() {
already fixed, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] apply-live-updates.sh: copy without glob
[not found] ` <1319133444-27980-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-10-20 17:57 ` [PATCH 2/2] make livenet module optional Will Woods
@ 2011-10-21 11:18 ` Harald Hoyer
1 sibling, 0 replies; 4+ messages in thread
From: Harald Hoyer @ 2011-10-21 11:18 UTC (permalink / raw)
To: Will Woods; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA
On 20.10.2011 19:57, Will Woods wrote:
> cp $SRC/* $DEST will skip dotfiles in $SRC.
> ( cd $SRC; cp -a -t $DEST . ) will copy everything.
> ---
> modules.d/90dmsquash-live/apply-live-updates.sh | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/modules.d/90dmsquash-live/apply-live-updates.sh b/modules.d/90dmsquash-live/apply-live-updates.sh
> index dfdb404..8dce5d4 100755
> --- a/modules.d/90dmsquash-live/apply-live-updates.sh
> +++ b/modules.d/90dmsquash-live/apply-live-updates.sh
> @@ -1,7 +1,8 @@
> #!/bin/sh
> if [ -b /dev/mapper/live-rw ]; then
> - if [ "`echo /updates/*`" != "/updates/*" ]; then
> + if pushd /updates &>/dev/null; then
> echo "Applying updates to live image..."
> - /bin/cp -a /updates/* $NEWROOT
> + /bin/cp -a -t $NEWROOT .
> + popd &>/dev/null
> fi
> fi
pushed, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-21 11:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-20 17:57 [PATCH 1/2] apply-live-updates.sh: copy without glob Will Woods
[not found] ` <1319133444-27980-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-10-20 17:57 ` [PATCH 2/2] make livenet module optional Will Woods
[not found] ` <1319133444-27980-2-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-10-21 11:16 ` Harald Hoyer
2011-10-21 11:18 ` [PATCH 1/2] apply-live-updates.sh: copy without glob Harald Hoyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox