Package: dovecot-core Version: 1:2.1.7-7+deb7u1 Severity: normal File: /etc/init.d/dovecot
The use of --name $DAEMON in start-stop-daemon commands for stopping/restarting/reloading daemon results in failures to a) install (due to failure of initscript) and b) failure to stop/restart/reload daemon when process names are not available due to limited /proc such as when running debian/kfreebsd-amd64 in a freebsd jail (some other virtualized environments apparently experience the same issue also due to limited /proc). linprocfs is mounted however /proc is not completely availabe for security reasons. Dropping --name $DAEMON and relying solely on $PIDFILE solves the issue -- Package-specific info: dovecot configuration --------------------- # 2.1.7: /etc/dovecot/dovecot.conf # OS: GNU/kFreeBSD 9.2-RELEASE-p9 x86_64 mail_location = mbox:~/mail:INBOX=/var/mail/%u managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave namespace inbox { inbox = yes location = mailbox Drafts { special_use = \Drafts } mailbox Junk { special_use = \Junk } mailbox Sent { special_use = \Sent } mailbox "Sent Messages" { special_use = \Sent } mailbox Trash { special_use = \Trash } prefix = } passdb { driver = pam } plugin { sieve = ~/.dovecot.sieve sieve_dir = ~/sieve } protocols = " imap lmtp sieve" service imap-login { inet_listener imap { address = 192.168.153.36 } inet_listener imaps { address = 192.168.153.36 } } service pop3-login { inet_listener pop3 { address = 192.168.153.36 } inet_listener pop3s { address = 192.168.153.36 } } ssl_cert = </etc/dovecot/dovecot.pem ssl_key = </etc/dovecot/private/dovecot.pem userdb { driver = passwd } -- System Information: Debian Release: 7.6 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 9.2-RELEASE-p9 Locale: LANG=en_CA.utf8, LC_CTYPE=en_CA.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages dovecot-core depends on: ii adduser 3.113+nmu3 ii libbz2-1.0 1.0.6-4 ii libc0.1 2.13-38+deb7u4 ii libpam-runtime 1.1.3-7.1 ii libpam0g 1.1.3-7.1 ii libssl1.0.0 1.0.1e-2+deb7u12 ii openssl 1.0.1e-2+deb7u12 ii ucf 3.0025+nmu3 ii zlib1g 1:1.2.7.dfsg-13 dovecot-core recommends no packages. Versions of packages dovecot-core suggests: pn dovecot-gssapi <none> ii dovecot-imapd 1:2.1.7-7+deb7u1 pn dovecot-ldap <none> ii dovecot-lmtpd 1:2.1.7-7+deb7u1 ii dovecot-managesieved 1:2.1.7-7+deb7u1 pn dovecot-mysql <none> ii dovecot-pgsql 1:2.1.7-7+deb7u1 pn dovecot-pop3d <none> ii dovecot-sieve 1:2.1.7-7+deb7u1 pn dovecot-solr <none> pn dovecot-sqlite <none> ii ntp 1:4.2.6.p5+dfsg-2 Versions of packages dovecot-core is related to: ii dovecot-core [dovecot-common] 1:2.1.7-7+deb7u1 pn dovecot-dbg <none> pn dovecot-dev <none> pn dovecot-gssapi <none> ii dovecot-imapd 1:2.1.7-7+deb7u1 pn dovecot-ldap <none> ii dovecot-lmtpd 1:2.1.7-7+deb7u1 ii dovecot-managesieved 1:2.1.7-7+deb7u1 pn dovecot-mysql <none> ii dovecot-pgsql 1:2.1.7-7+deb7u1 pn dovecot-pop3d <none> ii dovecot-sieve 1:2.1.7-7+deb7u1 pn dovecot-sqlite <none> -- Configuration Files: /etc/init.d/dovecot changed: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DESC="IMAP/POP3 mail server" NAME=dovecot DAEMON=/usr/sbin/dovecot DAEMON_ARGS="" SCRIPTNAME=/etc/init.d/$NAME CONF=/etc/dovecot/${NAME}.conf [ -r /etc/default/$NAME ] && . /etc/default/$NAME [ -x "$DAEMON" ] || exit 0 [ -f "$CONF" ] || exit 0 [ "$ENABLED" != "0" ] || exit 0 [ "$ALLOW_COREDUMPS" != "1" ] || ulimit -c unlimited .. /lib/lsb/init-functions if [ ! -r ${CONF} ]; then log_daemon_msg "${CONF}: not readable" "$NAME" && log_end_msg 1; exit 1; fi if [ -f /etc/inetd.conf ]; then # The init script should do nothing if dovecot or another imap/pop3 server # is being run from inetd, and dovecot is configured to run as an imap or # pop3 service for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \ /etc/inetd.conf` do for q in `doveconf -n -h protocols` do if [ $p = $q ]; then log_daemon_msg "protocol ${p} configured both in inetd and in dovecot" "$NAME" && log_end_msg 1 exit 0 fi done done fi PIDBASE=${PIDBASE:-`doveconf -n -c ${CONF} -h base_dir`} PIDFILE=${PIDBASE:-/var/run/dovecot}/master.pid do_start() { # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test -- -c ${CONF} > /dev/null \ || return start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -c ${CONF} \ $DAEMON_ARGS \ || return 2 } do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks # and if the daemon is only ever run from this initscript. # If the above conditions are not satisfied then add some other code # that waits for the process to drop all resources that could be # needed by services started subsequently. A last resort is to # sleep for some time. start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --pidfile $PIDFILE [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE return 0 } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; reload|force-reload) log_daemon_msg "Reloading $DESC" "$NAME" do_reload log_end_msg $? ;; restart) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? ;; *) echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2 exit 3 ;; esac -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org