From lx at redundancy.redundancy.org Tue Feb 8 18:05:51 2005 From: lx at redundancy.redundancy.org (David Thiel) Date: Tue, 8 Feb 2005 15:05:51 -0800 Subject: [osiris-devel] freebsd rc scripts Message-ID: <20050208230551.GD34694@redundancy.redundancy.org> In the install under freebsd, I notice that osiris tells the user to add osirisd_enable="YES" and/or osirismd_enable="YES" to /etc/rc.conf. However, the osiris startup scripts don't use those variables, as they're old-style rc scripts instead of rcng scripts. I've gone ahead and converted them to rcng style, which allows them to be controlled in this way. 4.x users would need to install sysutils/rc_subr for these scripts to work. This is usually already installed these days because of other ports using rcng scripts. I'd like these considered for replacing the current rc scripts included with osiris. Note that the script for osirisd has its own stop command instead of using the default rcng stop. This is because for some reason "kill -TERM $parentpid $childpid" doesn't actually kill the parent, but "killall -TERM osirisd" does. Can anyone tell me why this is? Cheers, David -------------- next part -------------- #!/bin/sh # PROVIDE: osirisd # REQUIRE: DAEMON # BEFORE: securelevel # KEYWORD: FreeBSD # # To enable osirisd, add: # #osirisd_enable=YES # # to one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/osirisd # osirisd_enable=${osirisd_enable:-"NO"} osirisd_flags=${osirisd_flags:-"-r @OSIRISDIR@"} . "/etc/rc.subr" name="osirisd" rcvar=`set_rcvar` command=@INSTALLDIR@/osirisd stop_cmd="osirisd_stop" osirisd_stop() { /usr/bin/killall ${name} > /dev/null 2>&1 && echo "Stopping ${name}." } load_rc_config $name run_rc_command "$1" -------------- next part -------------- #!/bin/sh # PROVIDE: osirismd # REQUIRE: DAEMON # BEFORE: securelevel # KEYWORD: FreeBSD # # To enable osirismd, add: # #osirismd_enable=YES # # to one of these files: # /etc/rc.conf # /etc/rc.conf.local # /etc/rc.conf.d/osirismd # osirismd_enable=${osirismd_enable:-"NO"} osirismd_flags=${osirismd_flags:-"-r @OSIRISDIR@"} . "/etc/rc.subr" name="osirismd" rcvar=`set_rcvar` command=@INSTALLDIR@/osirismd run_rc_command "$1" From brian at shmoo.com Wed Feb 9 22:12:17 2005 From: brian at shmoo.com (Brian Wotring) Date: Wed, 09 Feb 2005 20:12:17 -0700 Subject: [osiris-devel] freebsd rc scripts In-Reply-To: <20050208230551.GD34694@redundancy.redundancy.org> References: <20050208230551.GD34694@redundancy.redundancy.org> Message-ID: <420AD111.1010207@shmoo.com> Apologies for the slow response. The rc.conf additions are leftover from when the installer was initially developed, they do not need to be in there. The rc scripts were done this way for compatibility reasons. Is there a specific reason that you would like to migrate to RCng? Otherwise, I don't see any reasons to. As for -TERM, you're right. The osirisd daemon does seem to demonstrate this behavior on FreeBSD. It does not do this on Mac OS X or Linux. More than likely, it is related to signal initialization; I'll take a look unless someone beats me to it. Thanks for pointing this out. -brian David Thiel wrote: > In the install under freebsd, I notice that osiris tells the user to > add osirisd_enable="YES" and/or osirismd_enable="YES" to /etc/rc.conf. > However, the osiris startup scripts don't use those variables, as > they're old-style rc scripts instead of rcng scripts. I've gone ahead > and converted them to rcng style, which allows them to be controlled > in this way. > > 4.x users would need to install sysutils/rc_subr for these scripts to > work. This is usually already installed these days because of other > ports using rcng scripts. I'd like these considered for replacing the > current rc scripts included with osiris. > > Note that the script for osirisd has its own stop command instead of > using the default rcng stop. This is because for some reason "kill -TERM > $parentpid $childpid" doesn't actually kill the parent, but "killall > -TERM osirisd" does. Can anyone tell me why this is? > > Cheers, > David > > > > ------------------------------------------------------------------------ > > #!/bin/sh > > # PROVIDE: osirisd > # REQUIRE: DAEMON > # BEFORE: securelevel > # KEYWORD: FreeBSD > > # > # To enable osirisd, add: > # > #osirisd_enable=YES > # > # to one of these files: > # /etc/rc.conf > # /etc/rc.conf.local > # /etc/rc.conf.d/osirisd > # > > osirisd_enable=${osirisd_enable:-"NO"} > osirisd_flags=${osirisd_flags:-"-r @OSIRISDIR@"} > > . "/etc/rc.subr" > > name="osirisd" > rcvar=`set_rcvar` > command=@INSTALLDIR@/osirisd > stop_cmd="osirisd_stop" > > osirisd_stop() { > /usr/bin/killall ${name} > /dev/null 2>&1 && echo "Stopping ${name}." > } > > load_rc_config $name > run_rc_command "$1" > > > ------------------------------------------------------------------------ > > #!/bin/sh > > # PROVIDE: osirismd > # REQUIRE: DAEMON > # BEFORE: securelevel > # KEYWORD: FreeBSD > > # > # To enable osirismd, add: > # > #osirismd_enable=YES > # > # to one of these files: > # /etc/rc.conf > # /etc/rc.conf.local > # /etc/rc.conf.d/osirismd > # > > osirismd_enable=${osirismd_enable:-"NO"} > osirismd_flags=${osirismd_flags:-"-r @OSIRISDIR@"} > > . "/etc/rc.subr" > > name="osirismd" > rcvar=`set_rcvar` > command=@INSTALLDIR@/osirismd > > run_rc_command "$1" > > > ------------------------------------------------------------------------ > > _______________________________________________ > osiris-devel mailing list > osiris-devel at lists.shmoo.com > https://lists.shmoo.com/mailman/listinfo/osiris-devel From lx at redundancy.redundancy.org Wed Feb 9 23:28:40 2005 From: lx at redundancy.redundancy.org (David Thiel) Date: Wed, 9 Feb 2005 20:28:40 -0800 Subject: [osiris-devel] freebsd rc scripts In-Reply-To: <420AD111.1010207@shmoo.com> References: <20050208230551.GD34694@redundancy.redundancy.org> <420AD111.1010207@shmoo.com> Message-ID: <20050210042840.GA26472@redundancy.redundancy.org> On Wed, Feb 09, 2005 at 08:12:17PM -0700, Brian Wotring wrote: > The rc.conf additions are leftover from when the installer was initially > developed, they do not need to be in there. The rc scripts were done > this way for compatibility reasons. Is there a specific reason that you > would like to migrate to RCng? Otherwise, I don't see any reasons to. Well, it does provide the facilities to do start/stop/restart/status as well as the force versions of those commands without having to put them in the script yourself, and allows the user to control osiris centrally through rc.conf, and makes the application init behave predictably like other rcng scripts. It would also allow for startup ordering should the need arise someday. It makes the scripts simpler. And it's the official Way To Do Things Now. I understand the need for compatibility, but as I say, almost every user of freebsd 4.x has rcng capability as well these days, because most ports with rc scripts require it. I'd put it in the osiris port as well. But I don't feel super-strongly about it, it's certainly not an amazing gain. Cheers, David From brian at shmoo.com Thu Feb 10 10:10:34 2005 From: brian at shmoo.com (Brian Wotring) Date: Thu, 10 Feb 2005 08:10:34 -0700 Subject: [osiris-devel] freebsd rc scripts In-Reply-To: <20050210042840.GA26472@redundancy.redundancy.org> References: <20050208230551.GD34694@redundancy.redundancy.org> <420AD111.1010207@shmoo.com> <20050210042840.GA26472@redundancy.redundancy.org> Message-ID: <420B796A.3010201@shmoo.com> Release 4.1.2 is basically out the door, so timeing is right to add this to the fbsd install to give it some test time. Unless anyone else voices strong objections, of course. Thanks for the submissions! -brian David Thiel wrote: > On Wed, Feb 09, 2005 at 08:12:17PM -0700, Brian Wotring wrote: > >>The rc.conf additions are leftover from when the installer was initially >>developed, they do not need to be in there. The rc scripts were done >>this way for compatibility reasons. Is there a specific reason that you >>would like to migrate to RCng? Otherwise, I don't see any reasons to. > > > Well, it does provide the facilities to do start/stop/restart/status as > well as the force versions of those commands without having to put them > in the script yourself, and allows the user to control osiris centrally > through rc.conf, and makes the application init behave predictably like > other rcng scripts. It would also allow for startup ordering should the > need arise someday. It makes the scripts simpler. And it's the official > Way To Do Things Now. > > I understand the need for compatibility, but as I say, almost every user > of freebsd 4.x has rcng capability as well these days, because most > ports with rc scripts require it. I'd put it in the osiris port as well. > But I don't feel super-strongly about it, it's certainly not an amazing > gain. From brian at shmoo.com Sat Feb 19 18:17:13 2005 From: brian at shmoo.com (Brian Wotring) Date: Sat, 19 Feb 2005 16:17:13 -0700 Subject: [osiris-devel] time conversion Message-ID: <4217C8F9.8090909@shmoo.com> Anyone have a problem with this? The goal is to make this date header compliant with RFC 2822 as people have been randomly bringing it to my attention: char * osi_time_to_string( long time ) { static char buf[40]; time_t curtime; struct tm *loc; curtime = time; loc = localtime( &curtime ); /* based on RFC 2822 it should be: 3.3. Date and Time Specification ... date-time = [ day-of-week "," ] date FWS time [CFWS] ... */ strftime( buf, sizeof(buf) ,"%a, %e %b %Y %H:%M:%S %z\n", loc ); buf[39] = '\0'; return buf; } From brian at shmoo.com Tue Feb 22 21:12:18 2005 From: brian at shmoo.com (Brian Wotring) Date: Tue, 22 Feb 2005 19:12:18 -0700 Subject: [osiris-devel] source mirror up Message-ID: <421BE682.1000601@shmoo.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The subversion mirror is finally up. Thanks to Orrie at CU for hosting the mirror. The details for access can be found on the Osiris download page: If you have any problems with this mirror, please let me know. - -brian -----BEGIN PGP SIGNATURE----- Version: PGP 8.1 iQA/AwUBQhvmNg3seZ6WdHY9EQI3TgCg8qGDLax2/phrssld975gxKc5vuIAoLkK LtvKVXGrt+8kmBLBUErxsq2Z =f4oD -----END PGP SIGNATURE-----