Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 289729 Details for
Bug 387009
net-mail/fetchmail - modified initscript to allow multiple daemons AND inlined configuration
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
diff for fetchmail's initscript
fetchmail-init.diff (text/plain), 2.28 KB, created by
Pandu E Poluan
on 2011-10-13 06:21:56 UTC
(
hide
)
Description:
diff for fetchmail's initscript
Filename:
MIME Type:
Creator:
Pandu E Poluan
Created:
2011-10-13 06:21:56 UTC
Size:
2.28 KB
patch
obsolete
>--- /etc/init.d/fetchmail 2011-08-24 03:53:16.000000000 +0700 >+++ /etc/init.d/fetchmail.new 2011-10-13 21:00:30.000000000 +0700 >@@ -1,19 +1,52 @@ > #!/sbin/runscript > > pidfile="/var/run/fetchmail/${RC_SVCNAME}.pid" >-rcfile="/etc/${RC_SVCNAME}rc" > fidfile="/var/lib/fetchmail/${RC_SVCNAME}.fetchids" > >+# Need to define this variable here to make it global instead of local >+rcfile="" >+ > depend() { > need net > use mta > } > > checkconfig() { >- if [ ! -f ${rcfile} ]; then >- eerror "Configuration file ${rcfile} not found" >- return 1 >- fi >+ if [ -z "${fetchmail_config}" ]; then >+ # Config is not explicitly set in the relevant conf.d file >+ if [ -z "${fetchmail_rc}" ]; then >+ # User does not specify which file to use. Let's go find the right one >+ if [ -f /etc/${RC_SVCNAME}.rc ]; then >+ # Newer naming system >+ rcfile="/etc/${RC_SVCNAME}.rc" >+ elif [ -f /etc/${RC_SVCNAME}rc ]; then >+ # Older naming system >+ rcfile="/etc/${RC_SVCNAME}rc" >+ else >+ [ "x$1" != "xquiet" ] && eerror "Can't find any proper configuration for ${RC_SVCNAME}" >+ return 1 >+ fi >+ else >+ if [ -f ${fetchmail_rc} ]; then >+ rcfile="${fetchmail_rc}" >+ else >+ [ "x$1" != "xquiet" ] && eerror "Can't find ${fetchmail_rc} configuration file for ${RC_SVCNAME}" >+ return 1 >+ fi >+ fi >+ [ "x$1" != "xquiet" ] && einfo "Using configuration file: ${rcfile}" >+ else >+ [ "x$1" != "xquiet" ] && einfo "Using provided configuration in /etc/conf.d/${RC_SVCNAME}" >+ # Config is explicitly specified. Let's dump it into a file to be read back by fetchmail >+ # Why dumping it into a file instead of other methods (e.g., named pipe)? This allows >+ # troubleshooting. >+ rcfile="/var/run/fetchmail/${RC_SVCNAME}.rc" >+ echo "${fetchmail_config}" > $rcfile >+ fi >+ >+ # Ensure ownership and permissions to prevent fetchmail from complaining >+ chown fetchmail:root $rcfile >+ chmod 0700 $rcfile > } > > start() { >@@ -32,5 +65,13 @@ > ebegin "Stopping ${RC_SVCNAME}" > start-stop-daemon --stop --quiet --pidfile ${pidfile} > eend ${?} >+ >+ # To assist troubleshooting (e.g., starting from shell using >+ # 'fetchmail -v -f $rcfile'), we do the courtesy of changing >+ # $rcfile's owner. >+ if checkconfig quiet ; then >+ chown root:root $rcfile >+ chmod 0700 $rcfile >+ fi > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 387009
:
289729
|
289731
|
291965
|
291967