summaryrefslogtreecommitdiffstats
path: root/mkinitcpio
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2006-12-06 10:13:52 +0100
committerThomas Bächler <thomas@archlinux.org>2006-12-06 10:13:52 +0100
commit02607774d17c89fbe9b77e8bbb379518c502a6cd (patch)
tree1c8d5ecc387a205eedbb9d81a37264a14a09cf48 /mkinitcpio
parente8f8478b128b142262b6f0e3d24b6f9b766f81d3 (diff)
downloadmkinitcpio-02607774d17c89fbe9b77e8bbb379518c502a6cd.tar.gz
mkinitcpio-02607774d17c89fbe9b77e8bbb379518c502a6cd.tar.xz
Trying to address piix issue:
- added -m to print a message before passing control to kinit - added earlymodules= to preload modules git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@187 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'mkinitcpio')
-rw-r--r--mkinitcpio10
1 files changed, 8 insertions, 2 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 70f848c..ace6b77 100644
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -16,6 +16,7 @@
# Settings
BASEDIR=""
FILELIST="$(mktemp /tmp/.tmpfilelist.XXXX)"
+MESSAGEFILE="$(mktemp /tmp/.message.XXXX)"
KERNELVERSION="$(uname -r)"
FUNCTIONS="functions"
CONFIG="mkinitcpio.conf"
@@ -26,6 +27,7 @@ SAVELIST=""
GENIMG=""
APPEND=""
PRESET=""
+MESSAGE=""
PRESETDIR="mkinitcpio.d"
QUIET="y"
SHOW_AUTOMODS="n"
@@ -42,6 +44,7 @@ usage ()
echo " -g IMAGE Generate a cpio image as IMAGE. default: no"
echo " -a NAME Append to an existing filelist. default: no"
echo " -p PRESET Build specified preset."
+ echo " -m MESSAGE Print MESSAGE before passing control to kinit."
echo " -v Verbose output. Default: no"
echo " -M Display modules found via autodetection."
echo " -L List all available hooks."
@@ -50,7 +53,7 @@ usage ()
exit 1
}
-while getopts ':c:k:s:b:g:a:p:vH:LMh' arg; do
+while getopts ':c:k:s:b:g:a:p:m:vH:LMh' arg; do
if [ "${OPTARG:0:1}" = "-" ]; then
echo "error: optional argument to '-$arg' begins with a '-'"
echo " you probably don't want this....aborting."
@@ -64,6 +67,7 @@ while getopts ':c:k:s:b:g:a:p:vH:LMh' arg; do
g) GENIMG="$OPTARG" ;;
a) APPEND="y"; SAVELIST="y"; FILELIST="$OPTARG" ;;
p) PRESET="$OPTARG" ;;
+ m) MESSAGE="$OPTARG" ;;
v) QUIET="n" ;;
H) source "${INSTDIR}/${OPTARG}";
echo "Help for hook '${OPTARG}':"
@@ -85,9 +89,10 @@ shift $(($OPTIND - 1))
# use preset $PRESET
if [ -n "${PRESET}" ]; then
if [ -f "${PRESETDIR}/${PRESET}.preset" ]; then
- # Use -b and -v options specified earlier
+ # Use -b, -m and -v options specified earlier
PRESET_MKOPTS="${0}"
[ -n "${BASEDIR}" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -b ${BASEDIR}"
+ [ -n "${MESSAGE}" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -m ${MESSAGE}"
[ "${QUIET}" = "n" ] && PRESET_MKOPTS="${PRESET_MKOPTS} -v"
# Build all images
source ${PRESETDIR}/${PRESET}.preset
@@ -238,6 +243,7 @@ if [ "x$GENIMG" != "x" ]; then
if [ "x${SAVELIST}" == "x" ]; then
rm ${FILELIST}
fi
+ rm ${MESSAGEFILE}
else
echo ":: Dry run complete, use -g IMAGE to generate a real image"
fi