diff options
author | torben | 2016-02-08 15:30:57 +0100 |
---|---|---|
committer | torben | 2016-02-08 15:30:57 +0100 |
commit | 52103c38a2f530054fa9c10cb80e78539001e604 (patch) | |
tree | 5289c17524755c78ef0151e4446a228b3990a6b2 /builder/build-initramfs.sh | |
parent | Adding notes. (diff) | |
download | systemd-init-52103c38a2f530054fa9c10cb80e78539001e604.tar.gz systemd-init-52103c38a2f530054fa9c10cb80e78539001e604.tar.xz systemd-init-52103c38a2f530054fa9c10cb80e78539001e604.zip |
Improve logging.
Diffstat (limited to 'builder/build-initramfs.sh')
-rwxr-xr-x | builder/build-initramfs.sh | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh index b31de067..9f36c925 100755 --- a/builder/build-initramfs.sh +++ b/builder/build-initramfs.sh @@ -70,20 +70,21 @@ full_cleanup='no' use_systemd_in_initramfs='no' # TODO check for presence of linux kernel headers as core dependency declare -A core_dependencies=( + [cat]='print messages' \ [cpio]='pack initramfs' \ - [shift]='parse command line' \ + [dhclient]='support network connection in resulting initramfs' \ + [dirname]='core logic' \ + [dmsetup]='create a (temporary) writable layer during boot' \ + [grep]='retrieve right boot partition during boot' \ [mktemp]='create save temporary files and dictionaries' \ - [cat]='print messages' \ + [readlink]="connect dracut module with dracut's module system" \ [rm]='remove (temporary) files' \ + [shift]='parse command line' \ [sed]='process strings' \ - [readlink]="connect dracut module with dracut's module system" \ - [dirname]='core logic' \ - [dmsetup]='create a (temporary) writable layer during boot' \ - ['make gcc cmake']='dynamically compile needed resources against current or given kernel' \ - [grep]='retrieve right boot partition during boot') + ['cmake gcc make']='dynamically compile needed resources against current or given kernel') declare -A optional_dependencies=( - ['git gzip curl tar']='dynamically retrieve and unpack missing application which will be compiled for current or given kernel' \ - [chroot]='build against a distribution other than this program runs in') + [chroot]='build against a distribution other than this program runs in' \ + ['curl git gzip tar']='dynamically retrieve and unpack missing application which will be compiled for current or given kernel') declare -A core_shared_library_pattern_dependencies=( [libz]='compile dnbd3 for given or current kernel') declare -A optional_shared_library_pattern_dependencies=() @@ -341,7 +342,7 @@ dependency_check core package_dependencies utils_dependency_check_pkgconfig \ [[ $result == 0 ]] || exit $result logging.set_commands_level debug -logging.set_level debug +logging.set_level critical if ! parse_command_line "$@"; then print_help_message "$0" @@ -356,7 +357,6 @@ dependency_check optional package_dependencies \ utils_dependency_check_pkgconfig package || result=$? [[ $result == 1 ]] && exit $result - ## region handle delegated operations to specified target if [[ "$target" != '' ]]; then @@ -467,8 +467,12 @@ else # NOTE: We deactivate our exception handle since dracut returns "1" if it # is launched with help parameter ("-h" or "--help"). exceptions.deactivate - "$(dirname "${BASH_SOURCE[0]}")/dracut/dracut.sh" --local \ + if ! "$(dirname "${BASH_SOURCE[0]}")/dracut/dracut.sh" --local \ $_loglevel --modules "$_modules" ${dracut_parameter[*]} "$file_path" + then + logging.error 'Building initial ram file system fails.' + exit 1 + fi exceptions.activate fi exceptions.deactivate |