Re: Initdb fails... Again!
От | Dan Holmsand |
---|---|
Тема | Re: Initdb fails... Again! |
Дата | |
Msg-id | 3E318478.2020001@eyebee.com обсуждение исходный текст |
Ответ на | Re: Initdb fails... Again! (Jason Tishler <jason@tishler.net>) |
Список | 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@eyebee.com
В списке pgsql-cygwin по дате отправления: