summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions1
-rwxr-xr-xmkinitcpio39
2 files changed, 15 insertions, 25 deletions
diff --git a/functions b/functions
index d9abf46..97ffaf3 100644
--- a/functions
+++ b/functions
@@ -158,7 +158,6 @@ add_file() {
fi
}
-declare -a ADDED_MODULES
add_module() {
# Add a kernel module to the initcpio image. Dependencies will be
# discovered and added.
diff --git a/mkinitcpio b/mkinitcpio
index c9a7aa8..95c7923 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -13,33 +13,24 @@
shopt -s extglob
# Settings
-TMPDIR="$(mktemp -d /tmp/mkinitcpio.XXXXXX)"
-BASEDIR=""
-MESSAGEFILE="${TMPDIR}/message"
-KERNELVERSION="$(uname -r)"
-FUNCTIONS="functions"
-CONFIG="mkinitcpio.conf"
-HOOKDIR="hooks"
-INSTDIR="install"
-MODULE_FILE=""
-SAVELIST=""
-GENIMG=""
-PRESET=""
-MESSAGE=""
-SKIPHOOKS=()
-PRESETDIR="mkinitcpio.d"
-QUIET="y"
-SHOW_AUTOMODS="n"
-COMPRESSION="gzip"
-COMPRESSION_OPTIONS=""
-
-if [ ! $UID ]; then
- UID=$(id -u)
-fi
+TMPDIR=$(mktemp -d /tmp/mkinitcpio.XXXXXX)
+MESSAGEFILE=$TMPDIR/message
+KERNELVERSION=$(uname -r)
+FUNCTIONS=functions
+CONFIG=mkinitcpio.conf
+HOOKDIR=hooks
+INSTDIR=install
+PRESETDIR=mkinitcpio.d
+QUIET=y
+SHOW_AUTOMODS=n
+COMPRESSION=gzip
+
+declare BASEDIR MODULE_FILE SAVELIST GENIMG PRESET MESSAGE COMPRESSION_OPTIONS
+declare -a SKIPHOOKS ADDED_MODULES
# Add /{,usr}/sbin to path
# works around undetected problems like in #8448
-PATH="${PATH}:/sbin:/usr/sbin"
+PATH=$PATH:/sbin:/usr/sbin
# Sanitize environment further
# GREP_OPTIONS="--color=always" will break everything
unset GREP_OPTIONS