Exit if not running as root
This commit is contained in:
5
bbb.sh
5
bbb.sh
@@ -5,6 +5,11 @@ if [[ $# -eq 0 ]] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
basedir=`pwd`/beaglebone-black-$1
|
||||
|
||||
# Package installations for various sections.
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while fuser /var/lib/dpkg/lock >/dev/null ; do
|
||||
sleep 5
|
||||
done
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
# This is the Raspberry Pi Kali ARM build script - http://www.kali.org/downloads
|
||||
# A trusted Kali Linux image created by Offensive Security - http://www.offensive-security.com
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
|
||||
5
rpi.sh
5
rpi.sh
@@ -3,6 +3,11 @@ set -e
|
||||
# This is the Raspberry Pi Kali ARM build script - https://www.kali.org/downloads
|
||||
# A trusted Kali Linux image created by Offensive Security - https://www.offensive-security.com
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0, and (if you want) a hostname, default is kali"
|
||||
exit 0
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
# A trusted Kali Linux image created by Offensive Security - http://www.offensive-security.com
|
||||
# Maintained by @binkybear
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
# A trusted Kali Linux image created by Offensive Security - http://www.offensive-security.com
|
||||
# Maintained by @binkybear
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0"
|
||||
exit 0
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -eq 0 ]] ; then
|
||||
echo "Please pass version number, e.g. $0 2.0, and (if you want) a hostname, default is kali"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user