From a4c437490c5299a4cbaa5d39ab971c237d4999b9 Mon Sep 17 00:00:00 2001 From: ramon Date: Tue, 16 May 2017 10:11:24 +0000 Subject: #740: Compatibilidad entre versiones de Partclone que pueden usar {{{partclone.dd -c}}}, {{{partclone.dd}}} (sin {{{-c}}}) o {{{partclone.imager}}}. git-svn-id: https://opengnsys.es/svn/branches/version1.1@5300 a21b9725-9963-47de-94b9-378ad31fedc9 --- client/engine/Image.lib | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/engine/Image.lib') diff --git a/client/engine/Image.lib b/client/engine/Image.lib index 47ea2372..4afa0892 100755 --- a/client/engine/Image.lib +++ b/client/engine/Image.lib @@ -83,8 +83,8 @@ case "$TOOL" in # Por compatibilidad, si no existe el ejecutable usar por defecto "parclone.dd". which $PARAM1 &>/dev/null || PARAM1="partclone.dd" PARAM1="$PARAM1 -d0 -F -c -s $DEV" - # El programa partclone.dd no tiene opción "-c". - [[ "$PARAM1" =~ ^partclone.dd ]] && PARAM1="${PARAM1/ -c / }" + # Algunas versiones de partclone.dd no tienen opción "-c". + [ -z "$(eval ${PARAM1%% *} --help 2>&1 | grep -- -c)" ] && PARAM1="${PARAM1/ -c / }" ;; esac # Comprobar que existe mbuffer. -- cgit v1.2.3-18-g5258