mambareport: avoid reading missing machine information from standard input, set fields to unknown
This commit is contained in:
parent
fbd9612b03
commit
ea16cf3903
@ -11,18 +11,15 @@ TEMPFILE=`tempfile`
|
|||||||
. ${ROOT}/etc/sysconfig/machine
|
. ${ROOT}/etc/sysconfig/machine
|
||||||
|
|
||||||
[ ! "$SYSTEM_MANUFACTURER" -o "$SYSTEM_MANUFACTURER" = "System manufacturer" ] && {
|
[ ! "$SYSTEM_MANUFACTURER" -o "$SYSTEM_MANUFACTURER" = "System manufacturer" ] && {
|
||||||
echo -n "Please enter the name of the system manufacturer: "
|
SYSTEM_MANUFACTURER=unknown
|
||||||
read SYSTEM_MANUFACTURER
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[ ! "$SYSTEM_PRODUCT_NAME" -o "$SYSTEM_PRODUCT_NAME" = "System Product Name" ] && {
|
[ ! "$SYSTEM_PRODUCT_NAME" -o "$SYSTEM_PRODUCT_NAME" = "System Product Name" ] && {
|
||||||
echo -n "Please enter the name of the system product name: "
|
SYSTEM_PRODUCT_NAME=unknown
|
||||||
read SYSTEM_PRODUCT_NAME
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[ ! "$SYSTEM_SERIAL_NUMBER" -o "$SYSTEM_SERIAL_NUMBER" = "System Serial Number" ] && {
|
[ ! "$SYSTEM_SERIAL_NUMBER" -o "$SYSTEM_SERIAL_NUMBER" = "System Serial Number" ] && {
|
||||||
echo -n "Please enter the name of the system serial number: "
|
SYSTEM_SERIAL_NUMBER=unknown
|
||||||
read SYSTEM_SERIAL_NUMBER
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr ' ' _`
|
SYSTEM_MANUFACTURER=`echo $SYSTEM_MANUFACTURER | tr ' ' _`
|
||||||
|
Loading…
Reference in New Issue
Block a user