mambareport: avoid reading missing machine information from standard input, set fields to unknown

This commit is contained in:
Silvan Calarco 2013-02-27 11:11:36 +01:00
parent fbd9612b03
commit ea16cf3903

View File

@ -11,18 +11,15 @@ TEMPFILE=`tempfile`
. ${ROOT}/etc/sysconfig/machine
[ ! "$SYSTEM_MANUFACTURER" -o "$SYSTEM_MANUFACTURER" = "System manufacturer" ] && {
echo -n "Please enter the name of the system manufacturer: "
read SYSTEM_MANUFACTURER
SYSTEM_MANUFACTURER=unknown
}
[ ! "$SYSTEM_PRODUCT_NAME" -o "$SYSTEM_PRODUCT_NAME" = "System Product Name" ] && {
echo -n "Please enter the name of the system product name: "
read SYSTEM_PRODUCT_NAME
SYSTEM_PRODUCT_NAME=unknown
}
[ ! "$SYSTEM_SERIAL_NUMBER" -o "$SYSTEM_SERIAL_NUMBER" = "System Serial Number" ] && {
echo -n "Please enter the name of the system serial number: "
read SYSTEM_SERIAL_NUMBER
SYSTEM_SERIAL_NUMBER=unknown
}
SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr ' ' _`