Skip to content

Commit 103626e

Browse files
committed
Update install to always run as root.
This makes like simpler.
1 parent 93181cc commit 103626e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

install

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ set -e
33

44
[[ $DEBUG ]] && export DEBUG
55

6-
# Figure out what OS we are running on.
6+
(( $UID == 0)) || {
7+
echo "You must run this script as root!"
8+
exit 1
9+
}
710

8-
# Install prerequisites needed to run the dev tool
9-
# Also adds repos that let us fetch nginx and the Chef bits we need.
11+
# Figure out what OS we are running on.
1012

11-
export ISO_LIBRARY=/opt/dell/isos
1213
if [[ -f /etc/centos-release ]] && grep -q '6\.2' /etc/centos-release; then
1314
OUR_OS=centos-6.2
1415
elif [[ -f /etc/redhat-release ]] && grep -q '6\.2' /etc/redhat-release; then
@@ -25,7 +26,10 @@ if [[ ! $OUR_OS ]]; then
2526
exit 1
2627
fi
2728

28-
sudo ./install-prereqs $OUR_OS || exit 1
29+
# Install prerequisites needed to run the dev tool
30+
# Also adds repos that let us fetch nginx and the Chef bits we need.
31+
32+
./install-prereqs $OUR_OS || exit 1
2933

3034
if [[ ! -f /tftpboot/discovery/initrd0.img ]]; then
3135
sudo mkdir -p /tftpboot/discovery
@@ -38,4 +42,4 @@ fi
3842
# Initialize ourselves and pull down the barclamps we need.
3943
while ! ./dev switch; do sleep 5; done
4044

41-
sudo ./install-crowbar $OUR_OS || exit 1
45+
./install-crowbar $OUR_OS || exit 1

0 commit comments

Comments
 (0)