supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* runit on AIX
@ 2007-06-25 12:27 Daniel Clark
  2007-06-26 10:02 ` Gerrit Pape
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Clark @ 2007-06-25 12:27 UTC (permalink / raw)
  To: Supervision

Yay! - runit seems to be working fine on AIX 5.2 ML1 and AIX 5.3 ML5.
The only required change was to rename some defines in
"compile/uw_tmp.h1":

-#define UW_TMP_UFILE _PATH_UTMP
-#define UW_TMP_WFILE _PATH_WTMP
+#define UW_TMP_UFILE UTMP_FILE
+#define UW_TMP_WFILE WTMP_FILE

I'm sure there is a better way to do this involving auto-detecting
AIX. FYI the relevant shell code is:

aixbox# uname
AIX
aixbox# oslevel
5.3.0.0

(although I don't think you'd have to use oslevel as the change was
the same on 5.2 and 5.3)

I have an updated encap for runit with these changes up at:
http://bcfg2.org/browser/trunk/bcfg2/encap/src/encap-profiles/runit-1.7.2.ep

Cheers,
-- 
Daniel Clark # http://planyp.us/djbclark/profile
# http://dclark.us # http://opensysadmin.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: runit on AIX
  2007-06-25 12:27 runit on AIX Daniel Clark
@ 2007-06-26 10:02 ` Gerrit Pape
  2007-06-26 14:45   ` Daniel Clark
  0 siblings, 1 reply; 3+ messages in thread
From: Gerrit Pape @ 2007-06-26 10:02 UTC (permalink / raw)
  To: supervision

[-- Attachment #1: Type: text/plain, Size: 480 bytes --]

On Mon, Jun 25, 2007 at 08:27:39AM -0400, Daniel Clark wrote:
> Yay! - runit seems to be working fine on AIX 5.2 ML1 and AIX 5.3 ML5.
> The only required change was to rename some defines in
> "compile/uw_tmp.h1":
> 
> -#define UW_TMP_UFILE _PATH_UTMP
> -#define UW_TMP_WFILE _PATH_WTMP
> +#define UW_TMP_UFILE UTMP_FILE
> +#define UW_TMP_WFILE WTMP_FILE

Hi Daniel, simply falling back to UTMP_FILE if _PATH_UTMP isn't defined
should do it, see the patch below.

Thanks, Gerrit.

[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 464 bytes --]

diff --git a/src/uw_tmp.h1 b/src/uw_tmp.h1
index 57231fb..2d5e994 100644
--- a/src/uw_tmp.h1
+++ b/src/uw_tmp.h1
@@ -3,7 +3,17 @@
 
 /* sysdep: -utmpx */
 
+#ifdef _PATH_UTMP
 #define UW_TMP_UFILE _PATH_UTMP
 #define UW_TMP_WFILE _PATH_WTMP
+#else
+/* AIX only has UTMP_FILE */
+#ifdef UTMP_FILE
+#define UW_TMP_UFILE UTMP_FILE
+#define UW_TMP_WFILE WTMP_FILE
+#else
+#error neither _PATH_UTMP nor UTMP_FILE defined.
+#endif
+#endif
 
 typedef struct utmp uw_tmp;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: runit on AIX
  2007-06-26 10:02 ` Gerrit Pape
@ 2007-06-26 14:45   ` Daniel Clark
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Clark @ 2007-06-26 14:45 UTC (permalink / raw)
  To: supervision

I'm not a C programmer, so immediately thought of the shell-based
solution, but I agree your patch makes much more sense. I have some Q2
deadlines at work, but will test this probably over the weekend, and
report back to the list so it can get included in runit 1.7.3.

BTW I am not using runit to replace init, just as a service monitor,
so the "it's working on AIX" only applies to that use case; I haven't
(and am not planning on) trying to replace AIX init with runit.

On 6/26/07, Gerrit Pape <pape@smarden.org> wrote:
> On Mon, Jun 25, 2007 at 08:27:39AM -0400, Daniel Clark wrote:
> > Yay! - runit seems to be working fine on AIX 5.2 ML1 and AIX 5.3 ML5.
> > The only required change was to rename some defines in
> > "compile/uw_tmp.h1":
> >
> > -#define UW_TMP_UFILE _PATH_UTMP
> > -#define UW_TMP_WFILE _PATH_WTMP
> > +#define UW_TMP_UFILE UTMP_FILE
> > +#define UW_TMP_WFILE WTMP_FILE
>
> Hi Daniel, simply falling back to UTMP_FILE if _PATH_UTMP isn't defined
> should do it, see the patch below.
>
> Thanks, Gerrit.
>
>


-- 
Daniel Clark # http://planyp.us/djbclark/profile
# http://dclark.us # http://opensysadmin.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-26 14:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-25 12:27 runit on AIX Daniel Clark
2007-06-26 10:02 ` Gerrit Pape
2007-06-26 14:45   ` Daniel Clark

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).