rc skripty, was: startovanie amavisu

Stefan Kremen piftik at yhman.tnuni.sk
Tue Jul 19 17:40:44 CEST 2005


Zdravim opat.

Tak ohladne startovania amavisd-new som trocha pokrocil, nejakym zahadnym
sposobom hlaska "Permission denied" zmizla, teraz vsak mam iny problem.

Toto je startovaci skript /etc/rc.d/amavisd z portu (prikladam mierne skrateny
vypis):

# Add the following lines to /etc/rc.conf to enable amavisd:
#amavisd_enable="YES"
. /etc/rc.subr
name=amavisd
rcvar=`set_rcvar`
command=/usr/local/sbin/amavisd > /dev/null 2>&1
pidfile=/var/amavis/amavisd.pid
required_files=/usr/local/etc/amavisd.conf
stop_postcmd=stop_postcmd
stop_postcmd()
{
  rm -f $pidfile
}
# set defaults
amavisd_enable=${amavisd_enable:-"NO"}
amavisd_flags=${amavisd_flags:-"-u vscan"}
load_rc_config $name
run_rc_command "$1"


Do /etc/rc.conf som pridal:
amavisd_enable="YES"
amavisd_flags=""


Rucnym spustenim "/etc/rc.d/amavisd start" system vezme do uvahy
amavisd_flags="" a spusti proces bez parametra "-u vscan" (prikladam vypis z
/var/log/maillog):

Jul 19 16:23:08 fsev amavis[3597]: starting.  /usr/local/sbin/amavisd at
fsev.tnuni.sk amavisd-new-2.3.2 (20050629), Unicode aware
Jul 19 16:23:08 fsev amavis[3597]: user=, EUID: 0 (0);  group=, EGID: 0 5 0 0
(0 5 0 0)
Jul 19 16:23:08 fsev amavis[3597]: Perl version               5.008007
Jul 19 16:23:10 fsev amavis[3598]: Net::Server: Process Backgrounded
Jul 19 16:23:10 fsev amavis[3598]: Net::Server: 2005/07/19-16:23:10 Amavis
(type Net::Server::PreForkSimple) starting! pid(3598)
Jul 19 16:23:10 fsev amavis[3598]: Net::Server: Binding to TCP port 10024 on
host 127.0.0.1
Jul 19 16:23:10 fsev amavis[3598]: Net::Server: Chrooting to /var/amavis
Jul 19 16:23:10 fsev amavis[3598]: Net::Server: Setting gid to "110 110"
Jul 19 16:23:10 fsev amavis[3598]: Net::Server: Setting uid to "110"
Jul 19 16:23:10 fsev amavis[3598]: Module Amavis::Conf        2.042
Jul 19 16:23:10 fsev amavis[3598]: Module Archive::Tar        1.23
...
... atd., amavisd bezi a uspesne dropne rootovske privilegia


Ked vsak nastane situacia, ze pocitac startuje po reboote, system ako keby
ignoroval pritomnost amavisd_flags="" v /etc/rc.conf a spusti mi proces s
parametrom "-u vscan", co ja nechcem, pretoze potom mi nenastartuje amavisd v
chroot mode (mam za to, ze chroot(8) moze spustat iba root, ale man chroot mi
moj nazor nepotvrdil, ani nevyvratil) (prikladam vypis z /var/log/maillog):

Jul 19 16:23:51 fsev amavis[3620]: starting.  /usr/local/sbin/amavisd at
fsev.tnuni.sk amavisd-new-2.3.2 (20050629), Unicode aware, LANG=sk_SK.I
SO8859-2
Jul 19 16:23:51 fsev amavis[3620]: user=vscan, EUID: 110 (110);  group=110,
EGID: 110 110 (110 110)
Jul 19 16:23:51 fsev amavis[3620]: Perl version               5.008007
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: Process Backgrounded
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: 2005/07/19-16:23:53 Amavis
(type Net::Server::PreForkSimple) starting! pid(3621)
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: Binding to TCP port 10024 on
host 127.0.0.1
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: Group Not Defined.  Defaulting
to EGID '110 110'
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: User Not Defined.  Defaulting
to EUID '110'
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: Chrooting to /var/amavis
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: 2005/07/19-16:23:53 Couldn't
chroot to "/var/amavis"\n  at line 467 in file /usr/local/lib/perl5
/site_perl/5.8.7/Net/Server.pm
Jul 19 16:23:53 fsev amavis[3621]: Net::Server: 2005/07/19-16:23:53 Server
closing!



Moja otazka teda znie: To, ze pri starte pocitaca ignoruje amavisd_flags="" v
/etc/rc.conf a pri spustani rc skriptu zo shellu ho neignoruje, je vlastnost
alebo chyba (systemu alebo portu)?

dakujem, piftik

------------------------------------------------------
Tuto postu Vam prinasa Yhman a OpenWebmail.
This mail is brought to you by Yhman and OpenWebmail.





More information about the Users-l mailing list