From 6bdc6a0801c21824bbeb6553556cf95cdc0a8eb1 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Fri, 14 Mar 2014 13:19:06 +0100 Subject: [PATCH] correct client copy --- OPSI/postinst | 11 +---------- OPSI/preinst | 9 --------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/OPSI/postinst b/OPSI/postinst index fd7a878..0b9b29a 100644 --- a/OPSI/postinst +++ b/OPSI/postinst @@ -8,20 +8,12 @@ TMP_DIR=${CLIENT_DATA_DIR}/../${PRODUCT_ID}.tmp -major=`cat /etc/opsi/version | cut -d'.' -f1` -minor=`cat /etc/opsi/version | cut -d'.' -f2` -if [ ! $major -ge 4 ]; then - if [ $major -le 2 -o $minor -le 98 ]; then - echo "This product requires opsi version >= 3.99" 1>&2 - exit 1 - fi -fi - if [ -d $TMP_DIR ]; then echo 'Restoring previous directories...' for dirname in client; do for path in $TMP_DIR/$dirname; do if [ -d $path ]; then + test -e $TMP_DIR/`basename $path` && cp -ar $CLIENT_DATA_DIR/`basename $path`/* $TMP_DIR/`basename $path` test -e $CLIENT_DATA_DIR/`basename $path` && rm -rf $CLIENT_DATA_DIR/`basename $path` echo " moving $path to $CLIENT_DATA_DIR" mv $path $CLIENT_DATA_DIR/ || exit 1 @@ -33,7 +25,6 @@ fi echo "Removing temporary files..." rm -rf $TMP_DIR -chmod u+x,g+x $CLIENT_DATA_DIR/*.py diff --git a/OPSI/preinst b/OPSI/preinst index f2fa0e5..8f0e003 100644 --- a/OPSI/preinst +++ b/OPSI/preinst @@ -8,15 +8,6 @@ TMP_DIR=${CLIENT_DATA_DIR}/../${PRODUCT_ID}.tmp -major=`cat /etc/opsi/version | cut -d'.' -f1` -minor=`cat /etc/opsi/version | cut -d'.' -f2` -if [ ! $major -ge 4 ]; then - if [ $major -le 2 -o $minor -le 98 ]; then - echo "This product requires opsi version >= 3.99" 1>&2 - exit 1 - fi -fi - if [ -d $TMP_DIR ]; then echo "Temporary directory $TMP_DIR already exist, aborting!" 1>&2 exit 1