SOURCES: inetd.inet.sh - RPC support

qboosh qboosh at pld-linux.org
Sun Mar 12 14:59:01 CET 2006


Author: qboosh                       Date: Sun Mar 12 13:59:01 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- RPC support

---- Files affected:
SOURCES:
   inetd.inet.sh (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: SOURCES/inetd.inet.sh
diff -u SOURCES/inetd.inet.sh:1.11 SOURCES/inetd.inet.sh:1.12
--- SOURCES/inetd.inet.sh:1.11	Tue Aug  9 23:19:08 2005
+++ SOURCES/inetd.inet.sh	Sun Mar 12 14:58:56 2006
@@ -20,11 +20,15 @@
 
 	[ ${SERVICE_NAME:-not} = "not" ]	&& ERROR_CODE=11
 	[ ${PROTOCOL:-not} = "not" ]		&& ERROR_CODE=12
-	[ ${PORT:-not} = "not" ]		&& ERROR_CODE=13
 	[ ${USER:-not} = "not" ]		&& ERROR_CODE=14
 	[ ${SERVER:-not} = "not" ]		&& ERROR_CODE=15
 	[ ${FLAGS:-not} = "not" ]		&& ERROR_CODE=16
 	[ ${DAEMON:-not} = "not" ]		&& ERROR_CODE=17
+	if [ ${RPCNAME:-not} = "not" ]; then
+		[ ${PORT:-not} = "not" ]		&& ERROR_CODE=13
+	else
+		[ ${RPCVERSION:-not} = "not" ]		&& ERROR_CODE=18
+	fi
 
 	if [ ! $ERROR_CODE -eq 0 ] ; then
 		echo "ERROR: Parse error."
@@ -50,6 +54,9 @@
 			17)
 				echo "DAEMON not defined in /etc/sysconfig/rc-inetd/$CURRENT_SERVICE."
 				;;
+			18)
+				echo "RPCVERSION not defined in /etc/sysconfig/rc-inetd/$CURRENT_SERVICE."
+				;;
 		esac
 		return $ERROR_CODE
 	fi
@@ -64,7 +71,11 @@
 	|| grep -qs "[^#]*${PORT}/$PROTOCOL[^#]*[ \	]*${SERVICE_NAME}[ \	]" /etc/services \
 	|| SERVICE_NAME=${PORT}
 
-	echo "$SERVICE_NAME	$SOCK_TYPE	$PROTOCOL	$FLAGS	$USER	$SERVER $DAEMON $DAEMONARGS"
+	if [ ${RPCNAME:-not} = "not" ]; then
+		echo "$SERVICE_NAME	$SOCK_TYPE	$PROTOCOL	$FLAGS	$USER	$SERVER $DAEMON $DAEMONARGS"
+	else
+		echo "$RPCNAME/$RPCVERSION	$SOCK_TYPE	rpc/$PROTOCOL	$FLAGS	$USER	$SERVER $DAEMON $DAEMONARGS"
+	fi
 
 	return 0
 }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/inetd.inet.sh?r1=1.11&r2=1.12&f=u



More information about the pld-cvs-commit mailing list