Fix updating of the current symbolic link when LOGDIR is already set.
The current symbolic link was only set, if LOGDIR has not been
previously defined. If the user had chosen to cancel the running test
iteration and run it again by running start.sh again, the current
symbolic link was not updated.
Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
HAPD_AS=$DIR/../../hostapd/hostapd
WLANTEST=$DIR/../../wlantest/wlantest
HLR_AUC_GW=$DIR/../../hostapd/hlr_auc_gw
HAPD_AS=$DIR/../../hostapd/hostapd
WLANTEST=$DIR/../../wlantest/wlantest
HLR_AUC_GW=$DIR/../../hostapd/hlr_auc_gw
if [ -z "$LOGDIR" ] ; then
if [ -z "$LOGDIR" ] ; then
LOGDIR="$DIR/logs/$DATE"
mkdir -p $LOGDIR
LOGDIR="$DIR/logs/$DATE"
mkdir -p $LOGDIR
- rm -rf $DIR/logs/current
- ln -sf $DATE $DIR/logs/current
else
if [ -e $LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant ]; then
WPAS=$LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant
else
if [ -e $LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant ]; then
WPAS=$LOGDIR/alt-wpa_supplicant/wpa_supplicant/wpa_supplicant
+if test -w "$DIR/logs" ; then
+ rm -rf $DIR/logs/current
+ ln -sf $DATE $DIR/logs/current
+fi
+
if groups | tr ' ' "\n" | grep -q ^admin$; then
GROUP=admin
else
if groups | tr ' ' "\n" | grep -q ^admin$; then
GROUP=admin
else