root # /etc/init.d/nfsmount restart * Please use 'svc_stop; svc_start' and not 'start; stop' to * restart the service in its custom 'restart()' function. * Run nfsmount without arguments for more info. * Unmounting NFS filesystems... [ ok ] * Stopping NFS statd... [ ok ] * Starting NFS statd... [ ok ] * Mounting NFS filesystems... [ ok ] With the desired result is achieved, the complaint is valid. Reproducible: Always Steps to Reproduce: 1. # /etc/init.d/nfsmount restart Actual Results: * Please use 'svc_stop; svc_start' and not 'start; stop' to * restart the service in its custom 'restart()' function. * Run nfsmount without arguments for more info. Expected Results: restart() function should use svc_stop and svc_start, not stop and start as it does now.
The offending file is in net-fs/nfs-utils version 1.0.5-r1.
azarah: the same error msg happens in shorewall i think it should'nt be displayed, cause some apps provide restart functions by themself
True, but the issue is not restart(), but using stop() and start() instead of svc_{start,stop}() that does the dependency handling. Yes, the check is a bit braindead. Anyhow - what version of baselayout ... I do not get that here. This is with latest version of the script in cvs.
I actually checked the shorewall script: --------------------------------------- #!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later opts="start stop restart" depend() { need net provide firewall } start() { ebegin "Starting firewall" /sbin/shorewall start 1>/dev/null eend $? } stop() { ebegin "Stopping firewall" /sbin/shorewall stop 1>/dev/null eend $? } restart() { ebegin "Restarting firewall" /sbin/shorewall restart eend $? } ----------------------------------- This is plain *wrong*. Sure it does behave as expected, but not how it should be done. By default the system provide a restart function. If he however wants to do his own (like in this case to change the message printed), he should do it like this: ---------------------------- restart() { ebegin "Restarting firewall" svc_restart eend $? } ----------------------------
sys-apps/baselayout-1.8.6.8-r1 does this for me
this still an issue ?
Yes, the restart() function still uses start() and stop() rather than svc_stop/svc_start chrisw@newton chrisw $ qpkg -v -f /etc/init.d/nfsmount net-fs/nfs-utils-1.0.6 * chrisw@newton chrisw $ tail -4 /etc/init.d/nfsmount restart() { stop start } newton root # /etc/init.d/nfsmount restart * Please use 'svc_stop; svc_start' and not 'start; stop' to * restart the service in its custom 'restart()' function. * Run nfsmount without arguments for more info. * Unmounting NFS filesystems... [ ok ] * Stopping NFS statd... [ ok ] * Starting NFS statd... [ ok ] * Mounting NFS filesystems... [ ok ]
yes, it is, not to mention that rpc.statd does not honor the cmd line options set for it in /etc/conf.d/nfs (which is a big prob, esp if you are attempting to use nfs + a firewall)
this is fixed with latest files for other issue see bug #21835
This bug is not fix: appro root # /etc/init.d/nfsmount restart * Please use 'svc_stop; svc_start' and not 'start; stop' to * restart the service in its custom 'restart()' function. * Run nfsmount without arguments for more info. * Re-caching dependency info (mtimes differ)... * Unmounting NFS filesystems... [ ok ] * Mounting NFS filesystems... [ ok ] appro root # qpkg -nc -f -v /etc/init.d/nfsmount net-fs/nfs-utils-1.0.6-r6 Why not remove the restart-function from the script?
This is still a issue for me also. * Please use 'svc_stop; svc_start' and not 'start; stop' to * restart the service in its custom 'restart()' function. * Run nfsmount without arguments for more info. Also running net-fs/nfs-utils-1.0.6-r6