compat: encourage non-root use of bin/get-compat-kernels
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 19 Oct 2012 21:22:18 +0000 (14:22 -0700)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Fri, 19 Oct 2012 21:22:18 +0000 (14:22 -0700)
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
bin/get-compat-kernels

index 2fbb371a3cfe2ad2349306e65d19041f409802ae..30f5dfe5978a65965d2462a7d87e3ed703638d13 100755 (executable)
@@ -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"