Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 74879

Summary: suggestion - cupsd restart if cupsd stopped will only start the daemon
Product: [OLD] Docs-user Reporter: Alin Dobre (RETIRED) <alin>
Component: OtherAssignee: Xavier Neys (RETIRED) <neysx>
Status: RESOLVED FIXED    
Severity: minor CC: docs-team
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: http://www.gentoo.org/doc/en/quick-samba-howto.xml
Whiteboard:
Package list:
Runtime testing required: ---

Description Alin Dobre (RETIRED) gentoo-dev 2004-12-18 13:42:57 UTC
Not sure about choosing the right title for this bug, but here it goes...
Just a suggestion:
at line 718 in quick-samba-howto.xml (source), the code states the following:
<comment>(To start CUPS if it isn't started)</comment>
# <i>/etc/init.d/cupsd start</i>
<comment>(If CUPS is already started we'll need to restart it!)</comment>
# <i>/etc/init.d/cupsd restart</i>

The /sbin/runscript script is smart enough to only start the daemon if it's in `stopped' state, so wouldn't the first statement (cupsd start) be redundant against the second statement (cupsd restart), regardless of the daemon's state?
The whole code could be:
<comment>(If CUPS is already started we'll need to restart it or just start it, if stopped!)</comment>
# <i>/etc/init.d/cupsd restart</i>

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Xavier Neys (RETIRED) gentoo-dev 2004-12-21 10:08:21 UTC
Good idea.
Comment 2 Xavier Neys (RETIRED) gentoo-dev 2004-12-21 10:10:14 UTC
Fixed in CVS. Thanks.