On Fri, Jan 22, 2016 at 01:47:36PM -0800, Nye Liu wrote:

> > It should eventually figure things out?

> No, but I have a patch for nis script, attached...

I can't tell what this patch is supposed to do, sorry.

> --- dist/nis    2016-01-20 16:18:24.171239577 -0800
> +++ nis 2016-01-22 13:08:19.532968676 -0800
> @@ -43,24 +43,38 @@
> 
>         if [ "`ypwhich 2>/dev/null`" = "" ]
>         then
> +               running=""
>                 bound=""
>                 log_action_begin_msg "binding to YP server"
> -               for i in 1 2 3 4 5 6 7 8 9 10
> +               for i in `seq 10`
>                 do
>                         sleep 1
> -                       log_action_cont_msg "."
> -                       if [ "`ypwhich 2>/dev/null`" != "" ]
> +                       # make sure ypbind started; rpcbind might not be 
> ready yet
> +                       if [ -n "$( pidofproc ${NET}/ypbind )" ]
>                         then
> -                               echo -n " done] "
> -                               bound="yes"
> -                               break
> +                               log_action_cont_msg "."
> +                               running="yes"
> +                               if [ "`ypwhich 2>/dev/null`" != "" ]
> +                               then
> +                                       echo -n " done] "
> +                                       bound="yes"
> +                                       break
> +                               fi
> +                       else
> +                               running=""
> +                               # try to start ypbind again
> +                               log_action_cont_msg "x"
> +                               ypbind_start
>                         fi
>                 done
>                 # This should potentially be an error
>                 if [ "$bound" ] ; then
>                         log_action_end_msg 0
> -               else
> +               elif [ "$running" ] ; then
>                         log_action_end_msg 1 "backgrounded"
> +               else
> +                       log_action_end_msg 1 "failed"
> +                       exit 1
>                 fi
>         fi
>  }

Attachment: signature.asc
Description: PGP signature

Reply via email to