diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh index f5e8f2777..95d129082 100755 --- a/tests/hwsim/start.sh +++ b/tests/hwsim/start.sh @@ -7,13 +7,11 @@ HAPD=$DIR/../../hostapd/hostapd HAPD_AS=$DIR/../../hostapd/hostapd WLANTEST=$DIR/../../wlantest/wlantest HLR_AUC_GW=$DIR/../../hostapd/hlr_auc_gw +DATE="$(date +%s)" if [ -z "$LOGDIR" ] ; then - DATE="$(date +%s)" 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 @@ -29,6 +27,11 @@ else fi fi +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