openmamba-makereport: translate any '/' chars in output filename to avoid failure when creating it
This commit is contained in:
parent
9921ba0e3d
commit
ce3fe6e353
@ -2,7 +2,7 @@
|
||||
#
|
||||
# openmamba system report generation tool
|
||||
#
|
||||
# Copyright (c) 2008-2011 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
# Copyright (c) 2008-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
#
|
||||
|
||||
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 ] || {
|
||||
|
Loading…
Reference in New Issue
Block a user