]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
99base: Do not hardcode ANSI_COLOR
authorDaniel Molkentin <dmolkentin@suse.com>
Thu, 17 Oct 2019 14:08:26 +0000 (16:08 +0200)
committerHarald Hoyer <harald@hoyer.xyz>
Tue, 22 Oct 2019 11:49:03 +0000 (13:49 +0200)
Take it from /etc/os-release instead, as distributions
usually customize this setting, but keep it as default value.

modules.d/99base/module-setup.sh

index 97c2d83e9d5feb7b2cde8282db07d479930c5689..f5a2e030d262834dfde5dd3ddc6a1718003b1c6c 100755 (executable)
@@ -69,17 +69,19 @@ install() {
 
     local VERSION=""
     local PRETTY_NAME=""
+    # default values
+    ANSI_COLOR="0;34"
     if [ -e /etc/os-release ]; then
         . /etc/os-release
         [[ -n ${VERSION} ]] && VERSION+=" "
         [[ -n ${PRETTY_NAME} ]] && PRETTY_NAME+=" "
     fi
+    # force-override values
     NAME=dracut
     ID=dracut
     VERSION+="dracut-$DRACUT_VERSION"
     PRETTY_NAME+="dracut-$DRACUT_VERSION (Initramfs)"
     VERSION_ID=$DRACUT_VERSION
-    ANSI_COLOR="0;34"
 
     [ -e "${initdir}/usr/lib" ] || mkdir -m 0755 -p ${initdir}/usr/lib
     {