From: Amadeusz Żołnowski Date: Fri, 25 Mar 2011 14:56:48 +0000 (+0100) Subject: modules.d: logging functions adjusted to dracut-logger X-Git-Tag: 009~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1ef3951f37679a70cd8579b46e3b65b916acfb4;p=thirdparty%2Fdracut.git modules.d: logging functions adjusted to dracut-logger --- diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh index 57a0f9af5..f764c8e1e 100755 --- a/modules.d/10i18n/module-setup.sh +++ b/modules.d/10i18n/module-setup.sh @@ -115,12 +115,15 @@ install() { # original redhat-i18n module. Anyway it won't hurt. EXT_KEYMAPS+=\ ${UNIKEYMAP}\ ${GRP_TOGGLE} - [[ ${KEYMAP} ]] || dwarning 'No KEYMAP.' || return 1 + [[ ${KEYMAP} ]] || { + derror 'No KEYMAP.' + return 1 + } findkeymap ${KEYMAP} for map in ${EXT_KEYMAPS} do - dinfo "Adding extra map: ${map}" + ddebug "Adding extra map: ${map}" findkeymap ${map} done @@ -183,13 +186,15 @@ install() { done [[ ${kbddir} ]] || { - derror "Directories ${KBDSUBDIRS//,/, } not found. Please inform us about the issue including your OS name and version." + derror "Directories ${KBDSUBDIRS//,/, } not found. Please" \ + "inform us about the issue including your OS name and version." return 1 } [[ -f $I18N_CONF && -f $VCONFIG_CONF ]] || \ [[ ! ${hostonly} || ${i18n_vars} ]] || { - dwarning 'Please set up i18n_vars in configuration file.' + derror 'i18n_vars not set! Please set up i18n_vars in ' \ + 'configuration file.' } return 0 } diff --git a/modules.d/40network/module-setup.sh b/modules.d/40network/module-setup.sh index bbc3dc64f..66cda68c8 100755 --- a/modules.d/40network/module-setup.sh +++ b/modules.d/40network/module-setup.sh @@ -7,13 +7,14 @@ check() { for program in ip arping; do if ! type -P $program >/dev/null; then - dwarning "Could not find program \"$program\" required by network." + derror "Could not find program \"$program\" required by network." return 1 fi done for program in dhclient brctl ifenslave tr; do if ! type -P $program >/dev/null; then - dwarning "Could not find program \"$program\" it might be required by network." + dwarn "Could not find program \"$program\" it might be required " \ + "by network." fi done diff --git a/modules.d/50gensplash/module-setup.sh b/modules.d/50gensplash/module-setup.sh index cdcdabd26..c34413e00 100755 --- a/modules.d/50gensplash/module-setup.sh +++ b/modules.d/50gensplash/module-setup.sh @@ -24,7 +24,7 @@ install() { ' for line in ${out}; do if [[ ${line} =~ ^Warning ]]; then - dwarning "${line}" + dwarn "${line}" else derror "${line}" (( ret == 0 )) && ret=1 diff --git a/modules.d/98syslog/module-setup.sh b/modules.d/98syslog/module-setup.sh index 4db3e84c6..056e9d998 100755 --- a/modules.d/98syslog/module-setup.sh +++ b/modules.d/98syslog/module-setup.sh @@ -24,7 +24,8 @@ install() { elif type -P syslog-ng >/dev/null; then installs="syslog-ng" else - dwarning "Could not find any syslog binary although the syslogmodule is selected to be installed. Please check." + derror "Could not find any syslog binary although the syslogmodule" \ + "is selected to be installed. Please check." fi if [ -n "$installs" ]; then dracut_install cat diff --git a/modules.d/99base/module-setup.sh b/modules.d/99base/module-setup.sh index 5597fb384..ddf56ceba 100755 --- a/modules.d/99base/module-setup.sh +++ b/modules.d/99base/module-setup.sh @@ -36,10 +36,10 @@ install() { # Bail out if switch_root does not exist if type -P switch_root >/dev/null; then inst $(type -P switch_root) /sbin/switch_root \ - || derror "Failed to install switch_root" + || dfatal "Failed to install switch_root" else inst "$moddir/switch_root" "/sbin/switch_root" \ - || derror "Failed to install switch_root" + || dfatal "Failed to install switch_root" fi inst "$moddir/dracut-lib.sh" "/lib/dracut-lib.sh" inst_hook cmdline 10 "$moddir/parse-root-opts.sh"