-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dracut.sh): --sysroot option broken if global variables not set i…
…n conf When `$dracutsysrootdir` is set and references an existing directory, the internal global variables are never set, unless their value is assigned via configuration file. The simple fix would be turn all: ``` [[ -d $dracutsysrootdir$var ]] || var=value ``` into: ``` [[ -z $var || ! -d $dracutsysrootdir$var ]] && var=value ``` But this patch also includes a refactoring, removing duplicate code using the same `set_global_var` function to set and export global variables, and improving readability.
- Loading branch information
1 parent
823de8f
commit 6f4a5c9
Showing
1 changed file
with
73 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters