From ce3fe6e353ce86682fa753d8945ad79d6c260090 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 16 Aug 2013 10:41:15 +0200 Subject: [PATCH] openmamba-makereport: translate any '/' chars in output filename to avoid failure when creating it --- mambareport/openmamba-makereport | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mambareport/openmamba-makereport b/mambareport/openmamba-makereport index 130e0e9..3af524a 100755 --- a/mambareport/openmamba-makereport +++ b/mambareport/openmamba-makereport @@ -2,7 +2,7 @@ # # openmamba system report generation tool # -# Copyright (c) 2008-2011 by Silvan Calarco +# Copyright (c) 2008-2013 by Silvan Calarco # VERSION=20110807 @@ -22,12 +22,9 @@ TEMPFILE=`tempfile` SYSTEM_SERIAL_NUMBER=unknown } -SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr ' ' _` -SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr '-' _` -SYSTEM_PRODUCT_NAME=`echo $SYSTEM_PRODUCT_NAME | tr ' ' _` -SYSTEM_PRODUCT_NAME=`echo $SYSTEM_PRODUCT_NAME | tr '-' _` -SYSTEM_SERIAL_NUMBER=`echo $SYSTEM_SERIAL_NUMBER | tr ' ' _` -SYSTEM_SERIAL_NUMBER=`echo $SYSTEM_SERIAL_NUMBER | tr '-' _` +SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr ' ' _ | tr '-' _ | tr '/' _` +SYSTEM_PRODUCT_NAME=`echo $SYSTEM_PRODUCT_NAME | tr ' ' _ | tr '-' _ | tr '/' _` +SYSTEM_SERIAL_NUMBER=`echo $SYSTEM_SERIAL_NUMBER | tr ' ' _ | tr '-' _ | tr '/' _` REPORTNAME="openmamba-report-$SYSTEM_MANUFACTURER-$SYSTEM_PRODUCT_NAME-$SYSTEM_SERIAL_NUMBER.txt" @@ -126,7 +123,7 @@ _EOF } echo "openmamba report generation tool $VERSION" -echo "Copyright (c) 2008-2011 by Silvan Calarco" +echo "Copyright (c) 2008-2013 by Silvan Calarco" echo [ $UID = 0 ] || {