From: | Dan Holmsand <dan(at)eyebee(dot)com> |
---|---|
To: | Jason Tishler <jason(at)tishler(dot)net> |
Cc: | pgsql-cygwin(at)postgresql(dot)org |
Subject: | Re: Initdb fails... Again! |
Date: | 2003-01-24 18:22:48 |
Message-ID: | 3E318478.2020001@eyebee.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-cygwin |
Jason,
Jason Tishler wrote:
> BTW, by "sysv start script" do you mean using the sysvinit package. If
> so, then how did you get around the following issues:
>
> http://www.cygwin.com/ml/cygwin/2002-11/msg00669.html
> http://www.cygwin.com/ml/cygwin/2002-11/msg00677.html
> http://www.cygwin.com/ml/cygwin/2002-11/msg00838.html
Yeah, sysvinit and initscripts. I've been hoping something like that
would show up in cygwin for quite some time, so I've struggled a bit to
make it work.
First, sysvinit (I think) installed a bad inittab (without runlevel
support). Reinstall fixed this.
Second, su didn't work (I thought), so I started hacking together a
working su.
But then I noticed that su actually *does* work if a privileged enough
user with uid 0 (i.e. "root") runs it. So now I'm running /sbin/init as
a service as "root", after assigning all the necessary privileges to
"root" ("Run as part of the operating system", etc). You have to edit
/etc/passwd by hand to make sure root gets uid 0.
Third, you have to get some start scripts. In particular you have to
make sure that they create/delete a /var/lock/subsys/<service-name> file
when started/stopped. Check out how sshd and xinetd works.
To make all of this work, you may need to change a few file ownerships
to "root" from "SYSTEM" (mainly ssh files in /etc), and change a few
"user = SYSTEM" into "user = root" in xinetd's config files. That is a
bit of a hassle, but it's quite easy to locate troublespots when you can
"Run as" rxvt as root and just test the start scripts directly (as
opposed to running a service and pray that it works...).
But now it works (almost) perfectly, running apache, cron, sshd, xinetd,
ipc-daemon and postmaster. The only problem I've seen is that cron
restarts itself as SYSTEM, even when started as root, for some reason.
/dan
--
Dan Holmsand
IB
dan(at)eyebee(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Clift | 2003-01-26 03:12:11 | Have a PG 7.3.1 Windows (cygwin) easy installer... now what to do with it? |
Previous Message | Jason Tishler | 2003-01-24 17:52:05 | Re: Initdb fails... Again! |