Hello, I have a problem with my rcNG scripts. There are three scripts: named.sh, apache2.sh and proftpd.sh. Apache and ProFTPd require hostname resolving thus named should start firstly. The headers of my scripts are: named.sh: #!/bin/sh # # PROVIDE: named # REQUIRE: SERVERS # BEFORE: apache2 proftpd mysqld # KEYWORD: FreeBSD shutdown . /etc/rc.subr apache2.sh: #!/bin/sh # # PROVIDE: apache2 # REQUIRE: NETWORKING SERVERS named # BEFORE: DAEMON # KEYWORD: FreeBSD shutdown . /etc/rc.subr proftpd.sh: #!/bin/sh # # PROVIDE: proftpd # REQUIRE: DAEMON # BEFORE: LOGIN # KEYWORD: FreeBSD shutdown . /etc/rc.subr And when I enable all the three scripts in rc.conf, the apache hangs because it can't resolve the computer's hostname. It's really annoying, I have to manually start it after a reboot, or wait for the cronscript that checks whether it is running. What's wrong? Thanks in advance, G?bor K?vesd?n
On Mon, 18 Jul 2005 19:58:43 +0200 K?vesd?n G?bor <gabor.kovesdan@t-hosting.hu> wrote:> Hello, > > I have a problem with my rcNG scripts. There are three scripts: > named.sh, apache2.sh and proftpd.sh. Apache and ProFTPd require hostname > resolving thus named should start firstly. The headers of my scripts are: > > named.sh: > > #!/bin/sh > # > > # PROVIDE: named > # REQUIRE: SERVERS > # BEFORE: apache2 proftpd mysqld > # KEYWORD: FreeBSD shutdown > > . /etc/rc.subr > > > > > > apache2.sh: > > #!/bin/sh > # > > # PROVIDE: apache2 > # REQUIRE: NETWORKING SERVERS named > # BEFORE: DAEMON > # KEYWORD: FreeBSD shutdown > > . /etc/rc.subr > > > > proftpd.sh: > > #!/bin/sh > # > > # PROVIDE: proftpd > # REQUIRE: DAEMON > # BEFORE: LOGIN > # KEYWORD: FreeBSD shutdown > > . /etc/rc.subr > > > > > > And when I enable all the three scripts in rc.conf, the apache hangs > because it can't resolve the computer's hostname. It's really annoying, > I have to manually start it after a reboot, or wait for the cronscript > that checks whether it is running. > What's wrong?I had similar problems these days, and I found out that rcNG seems to be only active for /etc/rc.d/ (see rc.subr(8) and rcorder(8) + files in /etc/). So put your scripts there, and it will do what you want.> > Thanks in advance, > > G?bor K?vesd?n > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" >-- Best regards, C?dric Jonas
* K?vesd?n G?bor [2005-07-18 19:58 +0200]> I have a problem with my rcNG scripts. There are three scripts: named.sh, > apache2.sh and proftpd.sh. Apache and ProFTPd require hostname resolving thus > named should start firstly. The headers of my scripts are::> And when I enable all the three scripts in rc.conf, the apache hangs because > it can't resolve the computer's hostname. It's really annoying, I have to > manually start it after a reboot, or wait for the cronscript that checks > whether it is running. > What's wrong?I think this magic only works in /etc/rc.d. Try renaming your startup scripts 100.named.sh, 200.apache.sh, etc. I'm not sure, but FreeBSD used to run these scripts in /usr/local/etc/rc.d in alphanumeric order, and I presume that this functionality is preserved in 5.x to allow for backwards compatibility. Svein Halvor