[PC-BSD Commits] r19578 - pcbsd/current/src-sh/pc-thinclient
svn at pcbsd.org
svn at pcbsd.org
Tue Oct 2 09:25:05 PDT 2012
Author: kris
Date: 2012-10-02 16:25:05 +0000 (Tue, 02 Oct 2012)
New Revision: 19578
Modified:
pcbsd/current/src-sh/pc-thinclient/pc-thinclient
Log:
Fix a few warnings and minor issues in pc-thinclient
Modified: pcbsd/current/src-sh/pc-thinclient/pc-thinclient
===================================================================
--- pcbsd/current/src-sh/pc-thinclient/pc-thinclient 2012-10-02 16:12:09 UTC (rev 19577)
+++ pcbsd/current/src-sh/pc-thinclient/pc-thinclient 2012-10-02 16:25:05 UTC (rev 19578)
@@ -87,11 +87,13 @@
fi
# Add firewall exception
- cat /etc/pf.conf | grep "pass in on ${NIC} all" >/dev/null 2>/dev/null
- if [ "$?" != "0" ] ; then
+ if [ -e "/etc/pf.conf" ] ; then
+ cat /etc/pf.conf | grep "pass in on ${NIC} all" >/dev/null 2>/dev/null
+ if [ "$?" != "0" ] ; then
# Setup the firewall exclusion for this NIC
echo "pass in on ${NIC} all" >> /etc/pf.conf
- fi
+ fi
+ fi
# Add some entries for /etc/exports
cat /etc/exports 2>/dev/null | grep "$PXEWORLD" >/dev/null 2>/dev/null
@@ -115,8 +117,8 @@
# Add a bulk of IPs to /etc/hosts this fixes bugs with RPC timeouts
# when mounting NFS
- cat /etc/hosts | grep "192.168.2." >/dev/null 2>/dev/null
- if [ "$?" != "0" ] ; then
+ grep -q 'thinclient100' /etc/hosts
+ if [ $? -ne 0 ] ; then
i="100"
while
z="1"
@@ -242,7 +244,7 @@
PCBSD_ETCCONF="/usr/local/etc/pcbsd.conf"
# Set the mirror URL
- MIRRORURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_MIRROR: ' | sed 's|PCBSD_MIRROR:||g'`"
+ MIRRORURL="`cat ${PCBSD_ETCCONF} | grep 'PCBSD_MIRROR: ' | sed 's|PCBSD_MIRROR:||g' | tr -d ' '`"
# Set the system arch type
if [ "$SYSTYPE" = "desktop" ] ; then
More information about the Commits
mailing list