From: Sebastian Pipping Date: Tue, 31 May 2011 18:47:42 +0000 (+0200) Subject: Rename internal function whereis to prompt_user X-Git-Tag: v3.4.16~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6a00d8677ac6a1be4ddb4c5021ebfe0e94a623ed;p=genkernel.git Rename internal function whereis to prompt_user .. to avoid confustion with whereis(1) from sys-apps/util-linux --- diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index b228a77..37a7eb4 100755 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -377,7 +377,7 @@ crypt_filter() { fi } -whereis(){ +prompt_user(){ # $1 = variable whose value is the path (examples: "REAL_ROOT", # "LUKS_KEYDEV") # $2 = label @@ -386,7 +386,7 @@ whereis(){ eval local oldvalue='$'${1} [ \( $# != 2 \) -a \( $# != 3 \) ] && \ - bad_msg "Bad invocation of function whereis, please file a bug \ + bad_msg "Bad invocation of function prompt_user, please file a bug \ report with this message" && exit 1 [ -n "${3}" ] && local explnt=" or : ${3}" || local explnt="." @@ -771,15 +771,15 @@ openLUKS() { run_shell elif [ ${DEV_ERROR} -eq 1 ] then - whereis "LUKS_DEVICE" "${LUKS_NAME}" + prompt_user "LUKS_DEVICE" "${LUKS_NAME}" DEV_ERROR=0 elif [ ${KEY_ERROR} -eq 1 ] then - whereis "LUKS_KEY" "${LUKS_NAME} key" + prompt_user "LUKS_KEY" "${LUKS_NAME} key" KEY_ERROR=0 elif [ ${KEYDEV_ERROR} -eq 1 ] then - whereis "LUKS_KEYDEV" "${LUKS_NAME} key device" + prompt_user "LUKS_KEYDEV" "${LUKS_NAME} key device" KEYDEV_ERROR=0 else case "${LUKS_DEVICE}" in diff --git a/defaults/linuxrc b/defaults/linuxrc index 51c4529..94a2ccd 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -455,7 +455,7 @@ do good_msg "Detected real_root=${ROOT_DEV}" REAL_ROOT="${ROOT_DEV}" else - whereis "REAL_ROOT" "root block device" + prompt_user "REAL_ROOT" "root block device" got_good_root=0 continue fi @@ -465,7 +465,7 @@ do if [ "${REAL_ROOT}" = '' ] then # No REAL_ROOT determined/specified. Prompt user for root block device. - whereis "REAL_ROOT" "root block device" + prompt_user "REAL_ROOT" "root block device" got_good_root=0 # Check for a block device or /dev/nfs