All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] return proper value in function dracut_install
@ 2012-10-08  9:40 Dave Young
       [not found] ` <20121008094008.GA19986-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Young @ 2012-10-08  9:40 UTC (permalink / raw)
  To: harald-H+wXaHxf7aLQT0dZR+AlfA, initramfs-u79uwXL29TY76Z2rM5mHXA

dracut_install should return the real return value, so module install function
can detect the install failure.

Such as below in 99base:
dracut_install switch_root || dfatal "Failed to install switch_root"

Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
 dracut-functions.sh |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- dracut.orig/dracut-functions.sh
+++ dracut/dracut-functions.sh
@@ -563,9 +563,12 @@ if [[ $DRACUT_INSTALL ]]; then
     }
 
     dracut_install() {
+        local ret
         #dinfo "initdir=$initdir $DRACUT_INSTALL -l $@"
         $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l}  ${DRACUT_FIPS_MODE+-H} "$@"
-        (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l}  ${DRACUT_FIPS_MODE+-H} "$@" || :
+        ret=$?
+        (($ret != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l}  ${DRACUT_FIPS_MODE+-H} "$@" || :
+        return $ret
     }
 
     inst_library() {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] return proper value in function dracut_install
       [not found] ` <20121008094008.GA19986-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2012-10-16 15:19   ` Harald Hoyer
  0 siblings, 0 replies; 2+ messages in thread
From: Harald Hoyer @ 2012-10-16 15:19 UTC (permalink / raw)
  To: Dave Young; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA

Am 08.10.2012 11:40, schrieb Dave Young:
> dracut_install should return the real return value, so module install function
> can detect the install failure.
> 
> Such as below in 99base:
> dracut_install switch_root || dfatal "Failed to install switch_root"
> 
> Signed-off-by: Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  dracut-functions.sh |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- dracut.orig/dracut-functions.sh
> +++ dracut/dracut-functions.sh
> @@ -563,9 +563,12 @@ if [[ $DRACUT_INSTALL ]]; then
>      }
>  
>      dracut_install() {
> +        local ret
>          #dinfo "initdir=$initdir $DRACUT_INSTALL -l $@"
>          $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l}  ${DRACUT_FIPS_MODE+-H} "$@"
> -        (($? != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l}  ${DRACUT_FIPS_MODE+-H} "$@" || :
> +        ret=$?
> +        (($ret != 0)) && derror $DRACUT_INSTALL ${initdir+-D "$initdir"} -a ${DRACUT_RESOLVE_DEPS+-l}  ${DRACUT_FIPS_MODE+-H} "$@" || :
> +        return $ret
>      }
>  
>      inst_library() {
> 

https://admin.fedoraproject.org/updates/dracut-024-1.fc18

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-16 15:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08  9:40 [PATCH] return proper value in function dracut_install Dave Young
     [not found] ` <20121008094008.GA19986-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2012-10-16 15:19   ` Harald Hoyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.