head 1.8; access; symbols OPENPKG_E1_MP_HEAD:1.8 OPENPKG_E1_MP:1.8 OPENPKG_E1_MP_2_STABLE:1.8.2.2 OPENPKG_E1_FP:1.8.2.2 OPENPKG_2_STABLE_MP:1.8 OPENPKG_2_STABLE_20061018:1.8.2.2 OPENPKG_2_STABLE:1.8.0.2 OPENPKG_CW_FP:1.7; locks; strict; comment @# @; 1.8 date 2006.08.25.19.19.06; author rse; state Exp; branches 1.8.2.1; next 1.7; commitid Tvsj1UyQ8rQ89gKr; 1.7 date 2004.10.01.08.06.16; author rse; state Exp; branches; next 1.6; 1.6 date 2004.08.02.18.17.46; author rse; state Exp; branches; next 1.5; 1.5 date 2004.05.23.11.18.22; author rse; state Exp; branches; next 1.4; 1.4 date 2003.08.22.09.09.48; author cs; state Exp; branches; next 1.3; 1.3 date 2003.08.14.10.47.42; author rse; state Exp; branches; next 1.2; 1.2 date 2003.08.05.16.12.00; author rse; state Exp; branches; next 1.1; 1.1 date 2003.08.05.10.55.36; author cs; state Exp; branches; next ; 1.8.2.1 date 2006.08.25.19.19.06; author rse; state dead; branches; next 1.8.2.2; commitid iZxwRSmmWscPXUQr; 1.8.2.2 date 2006.10.16.14.56.03; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.8 log @replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality @ text @#!@@l_prefix@@/bin/openpkg rc ## ## rc.sav -- Run-Commands ## %config sav_enable="$openpkg_rc_def" sav_ides="http://downloads.sophos.com/downloads/ide/" sav_update="daily" %common sav_update () { # determine information sav_datadir="@@l_prefix@@/var/sav/data" sav_version=`@@l_prefix@@/bin/sweep -v |\ sed -n -e 's;^Product version[^0-9]*\([0-9]\)\.\([0-9]*\).*$;\1\2;p'` sav_zipfile="${sav_version}_ides.zip" sav_tmpdir="${sav_version}_ides" # download and unpack latest IDEs umask 077 cd ${sav_datadir} || exit 1 rm -f ${sav_zipfile} >/dev/null 2>&1 || true @@l_prefix@@/bin/curl -s -o ${sav_zipfile} ${sav_ides}/${sav_zipfile} || exit 1 rm -rf ${sav_tmpdir} >/dev/null 2>&1 || true mkdir ${sav_tmpdir} ( cd ${sav_tmpdir} && @@l_prefix@@/bin/unzip -jo ../${sav_zipfile} ) || exit 1 # remove deprecated IDEs which are not part of the latest IDE pack shopt -s nullglob for ide in *.ide; do if [ ! -f ${sav_tmpdir}/$ide ]; then rm -f $ide fi done # update IDE repository by installing IDE files @@l_prefix@@/lib/openpkg/shtool install -m 644 -o @@l_musr@@ -g @@l_mgrp@@ \ ${sav_tmpdir}/*.ide . # cleanup rm -f ${sav_zipfile} >/dev/null 2>&1 || true rm -rf ${sav_tmpdir} >/dev/null 2>&1 || true } %quarterly -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .quarterly ]; then sav_update || exit $? fi %hourly -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .hourly ]; then sav_update || exit $? fi %daily -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .daily ]; then sav_update || exit $? fi %weekly -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .weekly ]; then sav_update || exit $? fi @ 1.8.2.1 log @file rc.sav was added on branch OPENPKG_2_STABLE on 2006-10-16 14:56:03 +0000 @ text @d1 69 @ 1.8.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 69 #!@@l_prefix@@/bin/openpkg rc ## ## rc.sav -- Run-Commands ## %config sav_enable="$openpkg_rc_def" sav_ides="http://downloads.sophos.com/downloads/ide/" sav_update="daily" %common sav_update () { # determine information sav_datadir="@@l_prefix@@/var/sav/data" sav_version=`@@l_prefix@@/bin/sweep -v |\ sed -n -e 's;^Product version[^0-9]*\([0-9]\)\.\([0-9]*\).*$;\1\2;p'` sav_zipfile="${sav_version}_ides.zip" sav_tmpdir="${sav_version}_ides" # download and unpack latest IDEs umask 077 cd ${sav_datadir} || exit 1 rm -f ${sav_zipfile} >/dev/null 2>&1 || true @@l_prefix@@/bin/curl -s -o ${sav_zipfile} ${sav_ides}/${sav_zipfile} || exit 1 rm -rf ${sav_tmpdir} >/dev/null 2>&1 || true mkdir ${sav_tmpdir} ( cd ${sav_tmpdir} && @@l_prefix@@/bin/unzip -jo ../${sav_zipfile} ) || exit 1 # remove deprecated IDEs which are not part of the latest IDE pack shopt -s nullglob for ide in *.ide; do if [ ! -f ${sav_tmpdir}/$ide ]; then rm -f $ide fi done # update IDE repository by installing IDE files @@l_prefix@@/lib/openpkg/shtool install -m 644 -o @@l_musr@@ -g @@l_mgrp@@ \ ${sav_tmpdir}/*.ide . # cleanup rm -f ${sav_zipfile} >/dev/null 2>&1 || true rm -rf ${sav_tmpdir} >/dev/null 2>&1 || true } %quarterly -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .quarterly ]; then sav_update || exit $? fi %hourly -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .hourly ]; then sav_update || exit $? fi %daily -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .daily ]; then sav_update || exit $? fi %weekly -u @@l_musr@@ rcService sav enable yes || exit 0 if [ ".$sav_update" = .weekly ]; then sav_update || exit $? fi @ 1.7 log @fix updating under new X.Y.0 versions @ text @d1 1 a1 1 #!@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc @ 1.6 log @allow updating every 15 minutes to be consistent @ text @d16 1 a16 1 sed -n -e 's;^Product version[^0-9]*\([0-9]\)\.\([0-9.]*\).*$;\1\2;p'` @ 1.5 log @allow updating in three different intervals as its the case in the uvscan package, too @ text @d46 6 @ 1.4 log @fixed IDE updating @ text @d9 1 d11 42 a52 1 %hourly -u @@l_susr@@ d54 3 d58 5 a62 31 # determine information sav_datadir="@@l_prefix@@/var/sav/data" sav_version=`@@l_prefix@@/bin/sweep -v |\ sed -n -e 's;^Product version[^0-9]*\([0-9]\)\.\([0-9.]*\).*$;\1\2;p'` sav_zipfile="${sav_version}_ides.zip" sav_tmpdir="${sav_version}_ides" # download and unpack latest IDEs umask 077 cd ${sav_datadir} || exit 1 rm -f ${sav_zipfile} >/dev/null 2>&1 || true @@l_prefix@@/bin/curl -s -o ${sav_zipfile} ${sav_ides}/${sav_zipfile} || exit 1 rm -rf ${sav_tmpdir} >/dev/null 2>&1 || true mkdir ${sav_tmpdir} ( cd ${sav_tmpdir} && @@l_prefix@@/bin/unzip -jo ../${sav_zipfile} ) || exit 1 # remove deprecated IDEs which are not part of the latest IDE pack shopt -s nullglob for ide in *.ide; do if [ ! -f ${sav_tmpdir}/$ide ]; then rm -f $ide fi done # update IDE repository by installing IDE files @@l_prefix@@/lib/openpkg/shtool install -m 644 -o @@l_musr@@ -g @@l_mgrp@@ \ ${sav_tmpdir}/*.ide . # cleanup rm -f ${sav_zipfile} >/dev/null 2>&1 || true rm -rf ${sav_tmpdir} >/dev/null 2>&1 || true @ 1.3 log @fix IDE update job and run it hourly instead of just daily @ text @d27 1 a27 1 (cd ${sav_tmpdir} && @@l_prefix@@/bin/unzip -jo ../${sav_zipfile}) || exit 1 d29 2 a30 1 # update IDE repository d36 4 a39 2 cp ${sav_tmpdir}/*.ide . chmod 644 *.ide @ 1.2 log @finish packaging @ text @d8 1 a8 1 sav_ides="http://www.sophos.com/downloads/ide/" d10 1 a10 1 %daily -u @@l_susr@@ d23 1 d25 1 @ 1.1 log @upgrading package: sav 3.56 -> 2.14 @ text @d8 1 d12 27 a38 1 # FIXME: cs: periodic virus pattern fetching @