-#!/bin/sh
+#!/bin/sh -x
##########################################################
-# Copyright (C) 2001-2016 VMware, Inc. All rights reserved.
+# Copyright (C) 2001-2017 VMware, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# of suspend and resume events, respectively.
#
+logbase=/var/log/vmware-network
+logfile=$logbase.log
-echo `date` ": Executing '$0'"
+#
+# Rotate any logs
+#
+rotate_logfile() {
+ max=9
+ max=`expr $max - 1`
+ for s in `seq $max -1 1`; do
+ d=`expr $s + 1`
+ mv -f $logbase.$s.log $logbase.$d.log
+ done
+ mv -f $logbase.log $logbase.1.log
+}
+
+rotate_logfile
+
+# redirect stdio
+exec > $logfile 2>&1
+
+
+echo `date` ": Executing '$0 $*'"
echo
. `dirname "$0"`/../../statechange.subr
exitCode=$?
fi
;;
- *) ;;
+ *)
+ echo "No argument supplied."
+ ;;
esac
return $exitCode
}
main "$@"
+echo `date` ": Finished '$0 $*'"