Test: vagrant clixon-util upgrade, sudo -g not work 18.04

This commit is contained in:
Olof hagsand 2023-12-03 12:08:00 +01:00
parent 01fbf764e7
commit 5e84ad8008
3 changed files with 24 additions and 9 deletions

View file

@ -201,11 +201,15 @@ BUSER=clicon
: ${_ALREADY_HERE:=0}
if [ -n "$CLICON_GROUP" ] && [ $_ALREADY_HERE -eq 0 ]; then
# Extra test for some archs, ie ubuntu 18 that have problems with this
sudo -g ${CLICON_GROUP} $clixon_netconf 2> /dev/null
if [ $? -eq 0 ]; then
clixon_cli="sudo -g ${CLICON_GROUP} $clixon_cli"
clixon_netconf="sudo -g ${CLICON_GROUP} $clixon_netconf"
clixon_restconf="sudo -g ${CLICON_GROUP} $clixon_restconf"
clixon_snmp="sudo -g ${CLICON_GROUP} --preserve-env=MIBDIRS $clixon_snmp"
clixon_util_socket="sudo -g ${CLICON_GROUP} $clixon_util_socket"
fi
fi
_ALREADY_HERE=1

View file

@ -55,6 +55,16 @@ module example {
}
EOF
if [ $BE -ne 0 ]; then
# kill old backend (if any)
new "kill old backend"
sudo clixon_backend -zf $cfg
if [ $? -ne 0 ]; then
err
fi
fi
# Extra cmdline opts, first is overwritten, second appended
CMDOPTS='-o CLICON_MODULE_SET=42 -o CLICON_FEATURE="cmdline"'

View file

@ -75,17 +75,18 @@ sudo $MAKE install
(cd example; sudo $MAKE install)
sudo ldconfig
# Clixon-util
cd
test -d src/clixon-util || (cd src;git clone https://github.com/clicon/clixon-util.git)
cd src/clixon
git pull origin master
cd src/clixon-util
git pull origin main
./configure --with-cligen=/ --with-clixon=/
$MAKE clean
$MAKE -j10
sudo $MAKE install
cd test
cd
cd src/clixon/test
echo "#!/usr/bin/env bash" > ./site.sh
echo "IPv6=true" >> ./site.sh
if [ $release = "freebsd" -o $release = "dragonfly" ]; then