cleanup gen_issue.sh
This commit is contained in:
15
gen_issue.sh
15
gen_issue.sh
@@ -1,15 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
BOND_SUP=`/sbin/getcfg "Network" "BONDING Support" -d "FALSE"`
|
BOND_SUP=$(/sbin/getcfg "Network" "BONDING Support" -d "FALSE")
|
||||||
|
|
||||||
if [ "$BOND_SUP" = "TRUE" ]; then
|
if [ "$BOND_SUP" = "TRUE" ]; then
|
||||||
IP=`/sbin/ifconfig bond0 | grep "inet addr" | cut -f 2 -d ':' | cut -f 1 -d ' '`
|
IP=`/sbin/ifconfig bond0 | /bin/awk '{ if ($1 == "inet") { str = $2; split(str, a, ":"); print a[2];} }'`
|
||||||
else
|
else
|
||||||
IP=`/sbin/ifconfig eth0 | grep "inet addr" | cut -f 2 -d ':' | cut -f 1 -d ' '`
|
IP=`/sbin/ifconfig eth0 | /bin/awk '{ if ($1 == "inet") { str = $2; split(str, a, ":"); print a[2];} }'`
|
||||||
fi
|
fi
|
||||||
if [ "`/sbin/getcfg "Project" "Name" -d "null" -f /var/default`" != "null" ]; then
|
|
||||||
|
if [ "$(/sbin/getcfg "Project" "Name" -d "null" -f /var/default)" != "null" ]; then
|
||||||
echo "" > /etc/issue
|
echo "" > /etc/issue
|
||||||
echo -n "Welcome to `/sbin/getcfg System Model -d NAS`, " >> /etc/issue
|
echo -n "Welcome to `/sbin/getcfg System Model -d NAS`, " >> /etc/issue
|
||||||
echo "`/sbin/getcfg System Manufacturer -f /etc/default_config/uLinux.conf`." >> /etc/issue
|
echo "$(/sbin/getcfg System Manufacturer -f /etc/default_config/uLinux.conf)." >> /etc/issue
|
||||||
echo "" >> /etc/issue
|
echo "" >> /etc/issue
|
||||||
elif [ -f /etc/IS_G ]; then
|
elif [ -f /etc/IS_G ]; then
|
||||||
echo "" > /etc/issue
|
echo "" > /etc/issue
|
||||||
@@ -17,7 +19,6 @@ elif [ -f /etc/IS_G ]; then
|
|||||||
echo "" >> /etc/issue
|
echo "" >> /etc/issue
|
||||||
else
|
else
|
||||||
echo "" > /etc/issue
|
echo "" > /etc/issue
|
||||||
echo "Welcome to `/sbin/getcfg System Model -d NAS`($IP), QNAP Systems, Inc." >> /etc/issue
|
echo "Welcome to $(/sbin/getcfg System Model -d NAS)($IP), QNAP Systems, Inc." >> /etc/issue
|
||||||
echo "" >> /etc/issue
|
echo "" >> /etc/issue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user