From: Vitaly Kushneriuk <vitaly_kushneriuk@yahoo.com>
To: gentoo-dev@gentoo.org
Subject: Re: [gentoo-dev] qmail and .keep files
Date: 13 Dec 2001 14:18:47 +0200 [thread overview]
Message-ID: <1008245927.10992.6.camel@uranus.u235.eyep.net> (raw)
In-Reply-To: <1008243585.1015.4.camel@willow.theleaf.office>
[-- Attachment #1: Type: text/plain, Size: 2990 bytes --]
On Thu, 2001-12-13 at 13:39, Geert Bevin wrote:
>
> On Thu, 2001-12-13 at 12:33, Vitaly Kushneriuk wrote:
> >
> >
> > Hi!
> > Just wandering, what are those ".keep" files for?
> > Looks to me like a very ugly hack.
>
> The .keep files are necessary since otherwise when merging a new version
> and unmerging the old one, required empty dirs would be removed too.
> This is the way gentoo solves this problem standardly. Just look for
> .keep files all over your hd.
I know, and as I said, looks like a VERY ugly way of doing that.
Yet, no package should "own", in any way, the standard directories. They
can be created form post_install of, say, base_layout, and left there
forever. Then if a package provides /usr/bin/program, only program
should be included in CONTENTS, not the /usr/bin. The .keep files
can be used during build process, to indicate directories, that
do bolong to the package, but should not be installed (better to wrap
this by some "dokeepdir" func, to allow future change).
During unmerge, only "owned" directories can be removed,
and only if no other installed package uses them. A file with dir names
and usage counter can be used to track that.
>
> > Anyway, ebuild for qmail should not install them in the
> > queue directory, for qmail-qstat to work properly.
>
> Do you have real problems due to the .keep files?
Yes. run /var/qmail/bin/qmail-qstat. You'll get
about 20 unprocessed messages in the queue, while it's
actualy empty.
>
> > Also qmail rc file should be config-protected.
> > As there's no config-protection on per file basis (am I right?)
> > we should change it to:
> > ---------------------
> > #!/bin/sh
> > exec env - PATH="/var/qmail/bin:$PATH" \
> > qmail-start "`cat /var/qmail/control/defaultdelivery`"
> > ---------------------
> >
> > with control/defaultdelivery containing;
> > -------------
> > |dot-forward .forward
> > ./.maildir/
> > -------------
> > It will also fix the bug in current rc file: "dor-forward and
> > ./.maildir/ should be on SEPARATE lines.
>
> Good idea ! I'll add that
While you on it, consider attached qmail control script with many new
options.
Note: /init.d/svscan should be fixed not to use start-stop-daemon,
as it does not allow for more then one copy of svscan running.
It is better to run separate svscan in qmail/supervise dir then
linking qmail/supervise/* to /service, as this way you have better
control of when qmail will start.
>
> > Gentoo rules :-)
> > _______________________________________________
> > gentoo-dev mailing list
> > gentoo-dev@gentoo.org
> > http://lists.gentoo.org/mailman/listinfo/gentoo-dev
> >
> --
> Geert Bevin
> the Leaf sprl/bvba
> "Use what you need" Pierre Theunisstraat 1/47
> http://www.theleaf.be 1030 Brussels
> gbevin@theleaf.be Tel & Fax +32 2 241 19 98
>
> _______________________________________________
> gentoo-dev mailing list
> gentoo-dev@gentoo.org
> http://lists.gentoo.org/mailman/listinfo/gentoo-dev
[-- Attachment #2: qmail --]
[-- Type: text/x-sh, Size: 2336 bytes --]
#!/bin/sh
# /etc/rc.d/init.d/qmail
#
# description: Start, stop, restart, reload, and otherwise signal qmail.
#
# script modified by Vitaly Kushneriuk<vitaly@jungo.com> to support Gentoo init model.
# script modified by Vincent Danen <vdanen@mandrakesoft.com> on July 17 2000
# revision: 10/12/00 - added qmail-pop3d support
# 02/25/01 - added qmail-qmqpd support
# - added support for split packages
#
PATH=/var/qmail/bin:/usr/local/bin:/usr/bin:/bin
export PATH
depend(){
need net
}
start(){
ebegin "Starting qmail supervise"
cd /var/qmail/supervise
env - PATH="$PATH" svscan &
echo $! > /var/run/qmail-svscan.pid
eend ${?}
}
stop(){
ebegin "Stopping qmail svscan"
kill `cat /var/run/qmail-svscan.pid`
eend 0
ebegin "Stopping qmail"
svc -dx /var/qmail/supervise/*
eend 0
ebegin "Stopping qmail logs"
svc -dx /var/qmail/supervise/*/log
eend 0
}
stat(){
cd /var/qmail/supervise
svstat * */log
}
alrm(){
echo "Sending ALRM signal to qmail-send."
svc -a /var/qmail/supervise/qmail-send
}
doqueue(){
alrm
}
queue(){
qmail-qstat
qmail-qread
}
reload(){
hup
}
hup(){
echo "Sending HUP signal to qmail-send."
svc -h /var/qmail/supervise/qmail-send
}
pause(){
echo "Pausing qmail-send"
svc -p /var/qmail/supervise/qmail-send
echo "Pausing qmail-smtpd"
svc -p /var/qmail/supervise/qmail-smtpd
if [ -d /var/qmail/supervise/qmail-pop3d ]; then
echo "Pausing qmail-pop3d"
svc -p /var/qmail/supervise/qmail-pop3d
fi
if [ -d /var/qmail/supervise/qmail-qmqpd ]; then
echo "Pausing qmail-qmqpd"
svc -p /var/qmail/supervise/qmail-qmqpd
fi
}
cont(){
echo "Continuing qmail-send"
svc -c /var/qmail/supervise/qmail-send
echo "Continuing qmail-smtpd"
svc -c /var/qmail/supervise/qmail-smtpd
if [ -d /var/qmail/supervise/qmail-pop3d ]; then
echo "Continuing qmail-pop3d"
svc -c /var/qmail/supervise/qmail-pop3d
fi
if [ -d /var/qmail/supervise/qmail-qmqpd ]; then
echo "Continuing qmail-qmqpd"
svc -c /var/qmail/supervise/qmail-qmqpd
fi
}
opts="start stop stat restart alrm doqueue queue reload hup pause cont"
next prev parent reply other threads:[~2001-12-13 12:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-13 11:33 [gentoo-dev] qmail and .keep files Vitaly Kushneriuk
2001-12-13 11:39 ` Geert Bevin
2001-12-13 12:18 ` Vitaly Kushneriuk [this message]
2001-12-13 12:54 ` Geert Bevin
2001-12-13 13:13 ` Jerry A!
2001-12-13 17:45 ` [gentoo-dev] qmail and .keep files - admin consideration? jano
2001-12-13 17:47 ` Jerry A!
2001-12-13 18:24 ` Daniel Robbins
2001-12-13 18:03 ` [gentoo-dev] qmail and .keep files Daniel Robbins
2001-12-13 20:09 ` Geert Bevin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1008245927.10992.6.camel@uranus.u235.eyep.net \
--to=vitaly_kushneriuk@yahoo.com \
--cc=gentoo-dev@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox