summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Young <dyoung@redhat.com>2012-10-08 17:40:08 +0800
committerHarald Hoyer <harald@redhat.com>2012-10-08 06:17:28 -0400
commit06e9f8870a525e0f8a2016aa3e8cf83611a88754 (patch)
tree632ec05025712b55e3d59ee8c704dd95d9729bfd
parent7e0d508002c549ff4cd133d137c8b09ff8935705 (diff)
downloaddracut-06e9f8870a525e0f8a2016aa3e8cf83611a88754.tar.gz
dracut-06e9f8870a525e0f8a2016aa3e8cf83611a88754.tar.bz2
dracut-06e9f8870a525e0f8a2016aa3e8cf83611a88754.zip
return proper value in function dracut_install
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@redhat.com>
-rwxr-xr-xdracut-functions.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/dracut-functions.sh b/dracut-functions.sh
index 58b0b4dc..990aadf3 100755
--- a/dracut-functions.sh
+++ b/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() {