Skip to contentSkip to conversation

Get rid of some redundancy when sourcing our functions.

PATCH In review initramfs mailing list 1 participant 1 message Feb 16, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 12/50 Get rid of some redundancy when sourcing our functions.

Gitweb:     http://git.kernel.org/?p=linux/kernel/git/davej/dracut.git;a=commit;h=f9d7779e30d979bd157ae2831d5d3e9cd2c6db38
Commit:     f9d7779e30d979bd157ae2831d5d3e9cd2c6db38
Parent:     e4191d353f6afad96a144ddf13939d23e05c6e90
Author:     Victor Lowther <[email protected]>
AuthorDate: Fri Feb 13 04:41:59 2009 -0800
Committer:  Dave Jones <[email protected]>
CommitDate: Mon Feb 16 13:56:41 2009 -0500

[PATCH 12/50] Get rid of some redundancy when sourcing our functions.

---
 dracut |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)
dracut +5 -11
index 7ba4a09..c333173 100755
@@ -32,17 +32,11 @@ if [[ -f $outfile && ! $force ]]; then
     exit 1
 fi
 
-if [[ $allowlocal && -f ./init ]]; then
-    . ./dracut-functions
-    initfile=./init
-    switchroot=./switch_root
-    rulesdir=./rules.d
-else
-    . /usr/libexec/dracut/functions
-    initfile=/usr/libexec/dracut/init
-    switchroot=/usr/libexec/dracut/switch_root
-    rulesdir=/usr/libexec/dracut/rules.d
-fi
+[[ $allowlocal && -f ./init ]] && dsrc="." || dsrc=/usr/libexec/dracut
+. $dsrc/dracut-functions
+initfile=$dsrc/init
+switchroot=$dsrc/switch_root
+rulesdir=$dsrc/rules.d
 
 initdir=$(mktemp -d -t initramfs.XXXXXX)
 

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html