diff --git a/Makefile b/Makefile index a126df6d..6fe6866f 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ LDFLAGS = LIBS = VERSION = 0.4-pre PKG = finit-$(VERSION) -DFILES = Makefile README finit.c finit-mod.c finit-alt.c helpers.c helpers.h +DFILES = Makefile README finit.c finit-mod.c finit-alt.c helpers.c helpers.h \ + patches/*patch BINS = finit finit-mod finit-mdv @@ -71,8 +72,8 @@ helpers.o: helpers.c Makefile dist: rm -Rf $(PKG) - mkdir -p $(PKG)/contrib - cp Makefile $(DFILES) $(PKG) + mkdir -p $(PKG)/contrib $(PKG)/patches + for i in $(DFILES); do cp $$i $(PKG)/`dirname $$i`; done tar cf - $(PKG) | gzip -c > $(PKG).tar.gz rm -Rf $(PKG) ls -l $(PKG).tar.gz diff --git a/README b/README index f7f93316..bdd86ad6 100644 --- a/README +++ b/README @@ -49,34 +49,6 @@ umount vi console fb null ram0 sda1 sda2 sda3 sr0 tty0 - -Using finit with alternative systems ------------------------------------- - -Currently tested only with Mandriva 2008. Proceed with caution, there are -problems related to udev and pam. - -1 - Add init=/sbin/finit-mdv to the kernel boot line - -2 - Provide a suitable /usr/sbin/services.sh, this is the one I use in my - test system: - - mkdir /var/lock/subsys - chmod 1777 /var/lock/subsys - /etc/init.d/network start - dhclient eth0 - /sbin/start_udev& - /etc/init.d/portmap start - /etc/init.d/nfs-common start - -3 - Provide /etc/hostname if you don't have it already - -4 - Set the pointer device in the X server configuration to /dev/input/mice - -5 - Have a user named "user", or change the default in Makefile - - - Reboot and poweroff ------------------- diff --git a/README.mandriva b/README.mandriva new file mode 100644 index 00000000..8dee9bbc --- /dev/null +++ b/README.mandriva @@ -0,0 +1,32 @@ + +Mandriva 2008 +------------- + +1 - Add init=/sbin/finit-mdv to the kernel boot line + +2 - Provide a suitable /usr/sbin/services.sh, this is the one I use in my + test system: + + mkdir /var/lock/subsys + chmod 1777 /var/lock/subsys + /etc/init.d/network start + dhclient eth0 + /sbin/start_udev& + /etc/init.d/portmap start + /etc/init.d/nfs-common start + +3 - Provide /etc/hostname if you don't have it already + +4 - Set the pointer device in the X server configuration to /dev/input/mice + +5 - Have a user named "user", or change the default in Makefile + + + +Mandriva 2008.1 +--------------- + +If you have a stuck nash-hotplug consuming 100% of CPU after the boot, you +may want to patch mkinitrd using patches/mkinitrd-6.0.34-nash-hotplug.patch + + diff --git a/finit-alt.c b/finit-alt.c index fb3ff022..3f3ae0eb 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -193,7 +193,7 @@ int main() #endif unlink("/etc/mtab"); - system("mount -a"); /* must be after creation of /dev/loop0 */ + system("mount -a"); umask(0022); diff --git a/patches/mkinitrd-6.0.34-nash-hotplug.patch b/patches/mkinitrd-6.0.34-nash-hotplug.patch new file mode 100644 index 00000000..7d88f5b3 --- /dev/null +++ b/patches/mkinitrd-6.0.34-nash-hotplug.patch @@ -0,0 +1,14 @@ +Prevent nash-hotplug to keep running after boot using 100% of cpu + +diff -rud mkinitrd-6.0.34-orig/nash/hotplug.c mkinitrd-6.0.34/nash/hotplug.c +--- mkinitrd-6.0.34-orig/nash/hotplug.c 2008-03-06 21:20:34.000000000 -0300 ++++ mkinitrd-6.0.34/nash/hotplug.c 2008-03-12 18:48:46.000000000 -0300 +@@ -547,7 +547,7 @@ + nashLogger(nc, NASH_ERROR, "parent exited without telling us\n"); + close(nc->hp_childfd); + nc->hp_childfd = -1; +- break; ++ exit(1); + } + count += rc; + }