Skip to content

Commit 124a594

Browse files
InterLinked1Friendly Automation
authored and
Friendly Automation
committed
install_prereq: Remove sudo dependency.
Removes the use of sudo to run commands as root. The regular Asterisk install_prereq is expected to be run as root and does not require sudo, so we do the same to increase portability. ASTERISK-30202 #close Change-Id: I72f61cc779c868a312085f4913c03213e90943ca
1 parent 5ba336b commit 124a594

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

contrib/scripts/install_prereq

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,23 +85,23 @@ check_installed_rpms() {
8585
install_debian() {
8686
if ! [ -x "$(command -v aptitude)" ]; then
8787
if in_test_mode; then
88-
echo sudo apt-get install aptitude
88+
echo apt-get install aptitude
8989
echo "$0: Please install aptitude and try again. Aborting."
9090
exit 1
9191
fi
92-
sudo apt-get install aptitude
92+
apt-get install aptitude
9393
fi
94-
$testcmd sudo aptitude update
94+
$testcmd aptitude update
9595
extra_packs=`check_installed_debs $PACKAGES_DEBIAN`
9696
if [ x"$extra_packs" != "x" ] ; then
97-
$testcmd sudo aptitude install -y $extra_packs
97+
$testcmd aptitude install -y $extra_packs
9898
fi
9999
}
100100

101101
install_rh() {
102102
extra_packs=`check_installed_rpms $PACKAGES_RH`
103103
if [ x"$extra_packs" != "x" ] ; then
104-
$testcmd sudo yum install -y $extra_packs
104+
$testcmd yum install -y $extra_packs
105105
fi
106106
}
107107

@@ -144,7 +144,7 @@ fi
144144
install_asttest() {
145145
$testcmd cd asttest
146146
$testcmd make
147-
$testcmd sudo make install
147+
$testcmd make install
148148
$testcmd cd ..
149149
}
150150

@@ -155,15 +155,15 @@ install_sipp() {
155155

156156
PROJECT_DIR=sipp
157157

158-
$testcmd sudo rm -rf $PROJECT_DIR
158+
$testcmd rm -rf $PROJECT_DIR
159159
$testcmd git clone https://github.com/SIPp/sipp $PROJECT_DIR
160160
$testcmd cd $PROJECT_DIR
161161

162162
# Checkout and build the current latest released version.
163163
$testcmd git checkout v3.5.2
164164

165165
$testcmd ./build.sh --with-openssl --with-pcap --with-rtpstream --with-sctp
166-
$testcmd sudo make install
166+
$testcmd make install
167167

168168
$testcmd cd $SAVE_DIR
169169
}
@@ -175,7 +175,7 @@ install_pjsua() {
175175

176176
PROJECT_DIR=pjsua
177177

178-
$testcmd sudo rm -rf pjsua
178+
$testcmd rm -rf pjsua
179179
$testcmd git clone https://github.com/asterisk/pjproject $PROJECT_DIR
180180
$testcmd cd $PROJECT_DIR
181181

@@ -193,7 +193,7 @@ install_pjsua() {
193193
$testcmd make
194194

195195
# The testsuite only cares about pjsua from what we have built.
196-
$testcmd sudo cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu $MY_BIN/pjsua
196+
$testcmd cp -v pjsip-apps/bin/pjsua-`uname -m`-*-linux-gnu $MY_BIN/pjsua
197197

198198
$testcmd cd $SAVE_DIR
199199
}

0 commit comments

Comments
 (0)