Run under script for logging purposes.
authorValentin Vidic <vvidic@carnet.hr>
Thu, 24 Jan 2008 16:35:52 +0000 (17:35 +0100)
committerValentin Vidic <vvidic@carnet.hr>
Thu, 24 Jan 2008 16:35:52 +0000 (17:35 +0100)
src/cn-upgrade

index 40aa767..c5f5e40 100755 (executable)
@@ -2,7 +2,15 @@
 # last update: 2005-01-07
 # Zoran 'jelly' Dzelajlija <jelly@srce.hr>
 # Ivan 'ico' Rako <irako@srce.hr>
-version="carnet-upgrade v2.1.4"
+version="carnet-upgrade v4.0.0"
+
+# restart upgrade under script for logging purposes
+if [ "$1" == "--no-script" ]; then
+    shift
+elif [ -x /usr/bin/script ]; then
+    exec /usr/bin/script -a -c "$0 --no-script $@" \
+           /var/log/carnet-upgrade.typescript
+fi
 
 set -e