some tweaks for configRun: add -h/--usage option, use portable print instead of echo \c, etc.

This commit is contained in:
Douglas Mencken
2012-08-12 15:13:36 -06:00
committed by Jon Trulson
parent 7153a0e3e2
commit 2b8bd0743b
3 changed files with 39 additions and 14 deletions

View File

@@ -214,6 +214,19 @@ XCOMM exists the link is correct /usr/dt/link
EOF
}
PrintUsage()
{
echo "Usage:" $0 "[OPERATION]"
echo ""
echo "Operations:"
echo " -e configure"
echo " -d deconfigure"
echo " -v verify"
echo " -s size"
echo " -h help"
}
#include "../option.func"
XCOMM ##########################################################################
@@ -239,6 +252,12 @@ DEFAULT_PRINTER="DtPrint"
HandleOption $*
if [ "$OPERATION" = "usage" ]
then
PrintUsage
exit 0
fi
if [ "$OPERATION" = "configure" ]
then
@@ -324,7 +343,7 @@ DEFAULT_PRINTER="DtPrint"
then
awk '{print "kill -1 " $2}' /tmp/tmppsout | /bin/csh
else
/usr/sbin/inetd -s
[ -x /usr/sbin/inetd ] && /usr/sbin/inetd -s 2>/dev/null
fi
fi