diff --git a/rpcgssd.init b/rpcgssd.init index 29b4954..86e621b 100755 --- a/rpcgssd.init +++ b/rpcgssd.init @@ -58,23 +58,8 @@ case "$1" in [ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5" # Make sure the rpc_pipefs filesystem is available - [ "${RPCMTAB}" != "noload" ] && { - RPCMTAB=`grep -v '^#' /proc/mounts | \ - awk '{ if ($3 ~ /^rpc_pipefs$/ ) print $2}'` - [ -z "${RPCMTAB}" ] && { - [ -x /sbin/lsmod -a -x /sbin/modprobe ] && { - if ! /sbin/lsmod | grep sunrpc > /dev/null ; then - /sbin/modprobe sunrpc - fi - } - RPCMTAB=`grep -v '^#' /proc/mounts | \ - awk '{ if ($3 ~ /^rpc_pipefs$/ ) print $2}'` - [ -z "${RPCMTAB}" ] && { \ - echo "Error: RPC MTAB does not exist." - exit 6 - } - } - } + /bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/null 2>&1 + [ "${SECURE_NFS_MODS}" != "noload" ] && { [ -x /sbin/lsmod -a -x /sbin/modprobe ] && { for i in ${SECURE_NFS_MODS}; do diff --git a/rpcidmapd.init b/rpcidmapd.init index 0ce1507..513ffbb 100755 --- a/rpcidmapd.init +++ b/rpcidmapd.init @@ -57,23 +57,7 @@ case "$1" in echo -n $"Starting RPC idmapd: " # Make sure the rpc_pipefs filesystem is available - [ "${RPCMTAB}" != "noload" ] && { - RPCMTAB=`grep -v '^#' /proc/mounts | \ - awk '{ if ($3 ~ /^rpc_pipefs$/ ) print $2}'` - [ -z "${RPCMTAB}" ] && { - [ -x /sbin/lsmod -a -x /sbin/modprobe ] && { - if ! /sbin/lsmod | grep sunrpc > /dev/null ; then - /sbin/modprobe sunrpc - fi - } - RPCMTAB=`grep -v '^#' /proc/mounts | \ - awk '{ if ($3 ~ /^rpc_pipefs$/ ) print $2}'` - [ -z "${RPCMTAB}" ] && { \ - echo "Error: RPC MTAB does not exist." - exit 6 - } - } - } + /bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/null 2>&1 # Start daemon. daemon $prog ${RPCIDMAPDARGS} diff --git a/rpcsvcgssd.init b/rpcsvcgssd.init index 5f99b86..96d4c43 100755 --- a/rpcsvcgssd.init +++ b/rpcsvcgssd.init @@ -50,25 +50,9 @@ case "$1" in # List of kernel modules to load [ -z "${SECURE_NFS_MODS}" ] && SECURE_NFS_MODS="des rpcsec_gss_krb5" - # Make sure the rpc_pipefs filesystem is available - [ "${RPCMTAB}" != "noload" ] && { - RPCMTAB=`grep -v '^#' /proc/mounts | \ - awk '{ if ($3 ~ /^rpc_pipefs$/ ) print $2}'` - [ -z "${RPCMTAB}" ] && { - [ -x /sbin/lsmod -a -x /sbin/modprobe ] && { - if ! /sbin/lsmod | grep sunrpc > /dev/null ; then - /sbin/modprobe sunrpc - fi - } - RPCMTAB=`grep -v '^#' /proc/mounts | \ - awk '{ if ($3 ~ /^rpc_pipefs$/ ) print $2}'` - [ -z "${RPCMTAB}" ] && { \ - echo "Error: RPC MTAB does not exist." - exit 6 - } - } - } + /bin/mount -t rpc_pipefs sunrpc /var/lib/nfs/rpc_pipefs > /dev/null 2>&1 + [ "${SECURE_NFS_MODS}" != "noload" ] && { [ -x /sbin/lsmod -a -x /sbin/modprobe ] && { # Load rpcsec modules