From: Luis R. Rodriguez Date: Fri, 19 Oct 2012 21:22:18 +0000 (-0700) Subject: compat: encourage non-root use of bin/get-compat-kernels X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=8de8ebb2e585aa72b36ee748260da264b6f84778;p=openwrt%2Fstaging%2Fblogic.git compat: encourage non-root use of bin/get-compat-kernels Signed-off-by: Luis R. Rodriguez --- diff --git a/bin/get-compat-kernels b/bin/get-compat-kernels index 2fbb371a3cfe..30f5dfe5978a 100755 --- a/bin/get-compat-kernels +++ b/bin/get-compat-kernels @@ -203,11 +203,16 @@ fi echo -e "" -if [[ -n $KSRC_PREFIX ]]; then - echo -e "** Running as a non-privileged user!" - echo -e "** If you want to force using system-wide ${BLUE}/lib/modules${NORMAL} and ${BLUE}/usr/src${NORMAL}, you have to" - echo -e "** run this script as root or using ${GREEN}sudo${NORMAL}." +if [[ ! -n $KSRC_PREFIX ]]; then + echo -e "** Running as a privileged user!" + echo -e "** You are trying to force using system-wide ${BLUE}/lib/modules${NORMAL} and ${BLUE}/usr/src${NORMAL} ..." + echo -e "** This is a terrible idea. Consider running as a regular user." echo -e "" + read -p "Do you still want to continue (y/N)? " + if [[ "${REPLY}" != "y" ]]; then + echo -e "Bailing out !" + exit 1 + fi fi echo -e "This will download ${YELLOW}${NUM_KERNELS}${NORMAL} kernel headers to allow you to"