From 1c88ae1f613359beaa4acd8abf1157a9158bfe19 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 12:47:37 -0300 Subject: [PATCH 01/14] Run-parts code cleanup and minor fixes Signed-off-by: Claudio Matsuoka --- Makefile | 4 +++- helpers.c | 18 +++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 007b5596..a126df6d 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ CFLAGS += -march=pentium-m #CFLAGS += -DDIRECTISA # Use built-in run-parts instead of /bin/run-parts -#CFLAGS += BUILTIN_RUNPARTS +CFLAGS += -DBUILTIN_RUNPARTS ifneq ($(USER), "user") CFLAGS += -DDEFUSER=\"$(USER)\" @@ -67,6 +67,8 @@ finit.o: finit.c Makefile finit-mod.o: finit-mod.c Makefile +helpers.o: helpers.c Makefile + dist: rm -Rf $(PKG) mkdir -p $(PKG)/contrib diff --git a/helpers.c b/helpers.c index 0572f455..8ecd45c3 100644 --- a/helpers.c +++ b/helpers.c @@ -117,24 +117,18 @@ int run_parts(char *dir, ...) char *args[NUM_ARGS]; va_list ap; - if ((d = opendir(dir)) == NULL) - return -1; - if (chdir(dir)) return -1; + if ((d = opendir(dir)) == NULL) + return -1; + va_start(ap, dir); while (argnum < NUM_ARGS && (args[argnum++] = va_arg(ap, char *))); va_end(ap); - while (1) { - if ((e = readdir(d)) == NULL) - break; - - if (e->d_type == DT_REG) { - if (stat(e->d_name, &st)) - continue; - + while ((e = readdir(d))) { + if (e->d_type == DT_REG && stat(e->d_name, &st) == 0) { if (st.st_mode & S_IXUSR) { ent[num++] = strdup(e->d_name); if (num >= NUM_SCRIPTS) @@ -143,6 +137,8 @@ int run_parts(char *dir, ...) } } + closedir(d); + if (num == 0) return 0; From 89854a579f7b679935bfc5f9dde927051c57c361 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 13:57:22 -0300 Subject: [PATCH 02/14] Add nash-plugin patch, move Mandriva specifics to its own README file Signed-off-by: Claudio Matsuoka --- Makefile | 7 +++-- README | 28 ------------------- README.mandriva | 32 ++++++++++++++++++++++ finit-alt.c | 2 +- patches/mkinitrd-6.0.34-nash-hotplug.patch | 14 ++++++++++ 5 files changed, 51 insertions(+), 32 deletions(-) create mode 100644 README.mandriva create mode 100644 patches/mkinitrd-6.0.34-nash-hotplug.patch 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; + } From eb5445628fe1e9ef9d20312069aef58aa34f596a Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 15:45:03 -0300 Subject: [PATCH 03/14] Mount /dev as tmpfs in finit-alt if MAKE_DEVICES is set Signed-off-by: Claudio Matsuoka --- finit-alt.c | 6 +++++- finit-mod.c | 2 +- finit.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/finit-alt.c b/finit-alt.c index 3f3ae0eb..739a4eed 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -165,8 +165,11 @@ int main() #endif umask(0); +#ifdef MAKE_DEVICES + mount("udev", "/dev", "tmpfs", 0, "mode=0755"); mkdir("/dev/shm", 0755); mkdir("/dev/pts", 0755); +#endif mount("sysfs", "/sys", "sysfs", 0, NULL); mount("devpts", "/dev/pts", "devpts", 0, "gid=5,mode=620"); @@ -186,6 +189,7 @@ int main() chmod("/dev/null", 0667); chmod("/dev/mem", 0640); chardev("/dev/tty", 0666, 5, 0); + chardev("/dev/tty3", 0666, 4, 3); chardev("/dev/input/mice", 0660, 13, 63); chardev("/dev/input/event0", 0660, 13, 64); chardev("/dev/agpgart", 0660, 10, 175); @@ -285,7 +289,7 @@ int main() close(1); close(0); - if (open("/dev/tty1", O_RDWR, 0)) + if (open("/dev/tty1", O_RDWR) != 0) exit(1); sigemptyset(&act.sa_mask); diff --git a/finit-mod.c b/finit-mod.c index 30f11236..dc83b3fa 100644 --- a/finit-mod.c +++ b/finit-mod.c @@ -237,7 +237,7 @@ int main() close(1); close(0); - if (open("/dev/tty1", O_RDWR, 0)) + if (open("/dev/tty1", O_RDWR) != 0) exit(1); sigemptyset(&act.sa_mask); diff --git a/finit.c b/finit.c index 8364d737..0e107ec8 100644 --- a/finit.c +++ b/finit.c @@ -183,7 +183,7 @@ int main() close(1); close(0); - if (open("/dev/tty1", O_RDWR, 0)) + if (open("/dev/tty1", O_RDWR) != 0) exit(1); sigemptyset(&act.sa_mask); From b5e2af21a665b398b7d76f34de2ccdac226f43a6 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 16:06:38 -0300 Subject: [PATCH 04/14] Add example services.sh for Mandriva 2008 running KDE Signed-off-by: Claudio Matsuoka --- README.mandriva | 3 +++ contrib/services.sh-mdv2008 | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 contrib/services.sh-mdv2008 diff --git a/README.mandriva b/README.mandriva index 8dee9bbc..cd25cf7f 100644 --- a/README.mandriva +++ b/README.mandriva @@ -21,6 +21,9 @@ Mandriva 2008 5 - Have a user named "user", or change the default in Makefile +6 - Add the default user to group audio to be able to use sound (permissions + are not changed using pam) + Mandriva 2008.1 diff --git a/contrib/services.sh-mdv2008 b/contrib/services.sh-mdv2008 new file mode 100644 index 00000000..3d6e0727 --- /dev/null +++ b/contrib/services.sh-mdv2008 @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Example /usr/sbin/services.sh that can be used in a Mandriva 2008 system +# running KDE + +mkdir /var/lock/subsys +chmod 1777 /var/lock/subsys +/sbin/start_udev +mkdir /var/run/dbus +/etc/init.d/messagebus start +/etc/init.d/haldaemon start +/etc/init.d/alsa start +/etc/init.d/sound start +/etc/init.d/crond start +/etc/init.d/network-up start +/etc/init.d/network start +/etc/init.d/syslog start +kbuildsycoca --noincremental From 5ad9ff48c5ad2550c63ce46c0aae44c94d1cd55b Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 17:07:14 -0300 Subject: [PATCH 05/14] Use macro for line size, reuse line buffer for hostname and filename Signed-off-by: Claudio Matsuoka --- finit-alt.c | 19 +++++++++---------- finit-mod.c | 19 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/finit-alt.c b/finit-alt.c index 739a4eed..b29a17cb 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -90,6 +90,7 @@ THE SOFTWARE. #define chardev(x,m,maj,min) mknod((x), S_IFCHR|(m), makedev((maj),(min))) #define blkdev(x,m,maj,min) mknod((x), S_IFBLK|(m), makedev((maj),(min))) +#define LINE_SIZE 1024 void shutdown(int); void signal_handler(int); @@ -100,13 +101,11 @@ int main() { int i; FILE *f; - char line[2096]; + char line[LINE_SIZE]; int fd; DIR *dir; struct dirent *d; - char filename[1024]; struct sigaction sa, act; - char hline[1024]; char *x; sigset_t nmask, nmask2; @@ -144,7 +143,7 @@ int main() * Parse kernel parameters */ if ((f = fopen("/proc/cmdline", "r")) != NULL) { - fgets(line, 2095, f); + fgets(line, LINE_SIZE, f); if (strstr(line, "quiet")) { close(0); close(1); @@ -222,9 +221,9 @@ int main() while ((d = readdir(dir)) != NULL) { if (isalnum(d->d_name[0])) continue; - sprintf(filename, "/etc/resolvconf/run/interface/%s", - d->d_name); - unlink(filename); + snprintf(line, LINE_SIZE, + "/etc/resolvconf/run/interface/%s", d->d_name); + unlink(line); } closedir(dir); @@ -246,11 +245,11 @@ int main() #endif if ((f = fopen("/etc/hostname", "r")) != NULL) { - fgets(hline, 1023, f); - if ((x = strchr(hline, 0x0a)) != NULL) + fgets(line, LINE_SIZE, f); + if ((x = strchr(line, 0x0a)) != NULL) *x = 0; - sethostname(hline, strlen(hline)); + sethostname(line, strlen(line)); fclose(f); } diff --git a/finit-mod.c b/finit-mod.c index dc83b3fa..e3b633ba 100644 --- a/finit-mod.c +++ b/finit-mod.c @@ -81,6 +81,7 @@ Changelog from the original Eeepc fastinit: #define touch(x) mknod((x), S_IFREG|0644, 0) +#define LINE_SIZE 1024 void shutdown(int); void signal_handler(int); @@ -91,13 +92,11 @@ int main() { int i; FILE *f; - char line[2096]; + char line[LINE_SIZE]; int fd; DIR *dir; struct dirent *d; - char filename[1024]; struct sigaction sa, act; - char hline[1024]; char *x; sigset_t nmask, nmask2; @@ -133,7 +132,7 @@ int main() * Parse kernel parameters */ if ((f = fopen("/proc/cmdline", "r")) != NULL) { - fgets(line, 2095, f); + fgets(line, LINE_SIZE, f); if (strstr(line, "quiet")) { close(0); close(1); @@ -177,9 +176,9 @@ int main() while ((d = readdir(dir)) != NULL) { if (isalnum(d->d_name[0])) continue; - sprintf(filename, "/etc/resolvconf/run/interface/%s", - d->d_name); - unlink(filename); + snprintf(line, LINE_SIZE, + "/etc/resolvconf/run/interface/%s", d->d_name); + unlink(line); } closedir(dir); @@ -199,11 +198,11 @@ int main() touch("/etc/network/run/ifstate"); if ((f = fopen("/etc/hostname", "r")) != NULL) { - fgets(hline, 1023, f); - if ((x = strchr(hline, 0x0a)) != NULL) + fgets(line, LINE_SIZE, f); + if ((x = strchr(line, 0x0a)) != NULL) *x = 0; - sethostname(hline, strlen(hline)); + sethostname(line, strlen(line)); fclose(f); } From 494f182b1393e3ed88641fb864701520e06f39a1 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 17:17:17 -0300 Subject: [PATCH 06/14] Minor fixes, updated comments Signed-off-by: Claudio Matsuoka --- Changelog | 2 +- Makefile | 2 +- finit-mod.c | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 7284c0e1..66f4aad9 100644 --- a/Changelog +++ b/Changelog @@ -1,8 +1,8 @@ O.4 () - - create /dev/initctl fifo in finit-alt (for reboot) - default username for finit-alt configurable in Makefile - create loopback device node in finit-alt (for squashfs) - add option to use built-in run-parts instead of /bin/run-parts + - add services.sh example and nash-hotplug patch for Mandriva 0.3 (20080223) - Change poweroff method to reboot(RB_POWER_OFF) (Metalshark) diff --git a/Makefile b/Makefile index 6fe6866f..8852e19e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ LIBS = VERSION = 0.4-pre PKG = finit-$(VERSION) DFILES = Makefile README finit.c finit-mod.c finit-alt.c helpers.c helpers.h \ - patches/*patch + patches/*patch contrib/services.sh* BINS = finit finit-mod finit-mdv diff --git a/finit-mod.c b/finit-mod.c index e3b633ba..34934e76 100644 --- a/finit-mod.c +++ b/finit-mod.c @@ -41,6 +41,8 @@ Changelog from the original Eeepc fastinit: - Change poweroff method from writing 5 to /sys/power/state to reboot(RB_POWER_OFF) (by Metalshark) - Mount /var/run and /var/lock as tmpfs +- Add built-in run-parts option to be used instead of system("run-parts") +- Reuse cmdline buffer as hostname and filename buffers */ From 2e7952645ad287864a30983102ae766c2c651787 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 17:56:05 -0300 Subject: [PATCH 07/14] Make it like the original Signed-off-by: Claudio Matsuoka --- finit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/finit.c b/finit.c index 0e107ec8..8364d737 100644 --- a/finit.c +++ b/finit.c @@ -183,7 +183,7 @@ int main() close(1); close(0); - if (open("/dev/tty1", O_RDWR) != 0) + if (open("/dev/tty1", O_RDWR, 0)) exit(1); sigemptyset(&act.sa_mask); From a52c932085e36b6f14efc5fe15eb2fedad8616eb Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 18:03:23 -0300 Subject: [PATCH 08/14] Cosmetic changes Signed-off-by: Claudio Matsuoka --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8852e19e..367fd581 100644 --- a/Makefile +++ b/Makefile @@ -19,13 +19,10 @@ BINS = finit finit-mod finit-mdv # Add -DDEBUG to build with debug messages, also drops to terminal after X #CFLAGS += -DDEBUG -# Parameters added by Metalshark - # Use -march=pentium-m to build for Eeepc CFLAGS += -march=pentium-m # Omit the first /sbin/hwclock if CONFIG_RTC_HCTOSYS is enabled in the kernel - #CFLAGS += -DNO_HCTOSYS # Append –directisa to /sbin/hwclock lines if the user has disabled @@ -36,11 +33,14 @@ CFLAGS += -march=pentium-m # Use built-in run-parts instead of /bin/run-parts CFLAGS += -DBUILTIN_RUNPARTS +#### End of configurable parameters + + + ifneq ($(USER), "user") CFLAGS += -DDEFUSER=\"$(USER)\" endif - .c.o: $(CC) -c $(CFLAGS) -o $*.o $< @@ -77,3 +77,4 @@ dist: tar cf - $(PKG) | gzip -c > $(PKG).tar.gz rm -Rf $(PKG) ls -l $(PKG).tar.gz + From 6fc2a6b1086e406cb2590c6ab30a619afa65a31e Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Sun, 16 Mar 2008 18:37:07 -0300 Subject: [PATCH 09/14] Add KDE dbus note Signed-off-by: Claudio Matsuoka --- README | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README b/README index bdd86ad6..1d48b006 100644 --- a/README +++ b/README @@ -1,4 +1,3 @@ - Eeepc "fastinit" reimplementations ---------------------------------- @@ -56,3 +55,12 @@ Stock reboot and poweroff utilities of a modern Linux distribution may not work correctly with finit. You can replace them with simple scripts that send SIGUSR1 to finit for reboot, SIGUSR2 for poweroff. + +Using finit with KDE +-------------------- + +If you use finit to start KDE with auto-login enabled, hal-based device +automounting may not work correctly. That happens because the session +is started before the system message bus, so add a "dcop kded mediamanager +reloadBackends" call in the user AutoStart to restart the client. + From f94a76ed1723906ca11696711d3ca633620c0b9c Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Mon, 17 Mar 2008 12:29:47 -0300 Subject: [PATCH 10/14] Minor documentation updates Signed-off-by: Claudio Matsuoka --- README | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README b/README index 1d48b006..31ceaaa6 100644 --- a/README +++ b/README @@ -1,15 +1,17 @@ + Eeepc "fastinit" reimplementations ---------------------------------- finit.c is a reimplementation of the Asus Eeepc fastinit program based on its library calls. It tries to be an accurate re-creation and keeps -the original bugs and lack of optimization. +the original bugs and unoptimized calls. -finit-mod.c is a fixed/improved version of finit.c. +finit-mod.c is a fixed/improved version of finit.c intended to be a drop-in +replacement for the original Eeepc OS. finit-alt.c is a fixed/improved version of finit.c for alternative Linux -distributions running on the Eeepc (previously ffinit.c). Currently able -to boot unmodified Mandriva Linux. +distributions running on the Eeepc (previously ffinit.c). It's currently +able to boot an almost unmodified Mandriva Linux 2008.0/2008.1. See Makefile for configurable parameters to better suit your system. From 9908a6e68050b131f1209ad4010cb111cd2e4e23 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Tue, 18 Mar 2008 16:24:40 -0300 Subject: [PATCH 11/14] Documentaion update Signed-off-by: Claudio Matsuoka --- README.mandriva | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.mandriva b/README.mandriva index cd25cf7f..f0d0855a 100644 --- a/README.mandriva +++ b/README.mandriva @@ -5,7 +5,7 @@ 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: + test system running e17: mkdir /var/lock/subsys chmod 1777 /var/lock/subsys @@ -15,6 +15,8 @@ Mandriva 2008 /etc/init.d/portmap start /etc/init.d/nfs-common start + If you use KDE or need more services, see examples in contrib/ + 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 From 71ce4b98e941a8b1114f456ec19a85f3d6430bc5 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Tue, 18 Mar 2008 16:38:08 -0300 Subject: [PATCH 12/14] Minor documentation updates Signed-off-by: Claudio Matsuoka --- Makefile | 2 +- README | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 367fd581..8d33e8af 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ CFLAGS += -march=pentium-m # Omit the first /sbin/hwclock if CONFIG_RTC_HCTOSYS is enabled in the kernel #CFLAGS += -DNO_HCTOSYS -# Append –directisa to /sbin/hwclock lines if the user has disabled +# Append -directisa to /sbin/hwclock lines if the user has disabled # CONFIG_GENRTC and enabled CONFIG_RTC but not enabled CONFIG_HPET_TIMER # and CONFIG_HPET_RTC_IRQ. #CFLAGS += -DDIRECTISA diff --git a/README b/README index 31ceaaa6..e81d2053 100644 --- a/README +++ b/README @@ -11,7 +11,7 @@ replacement for the original Eeepc OS. finit-alt.c is a fixed/improved version of finit.c for alternative Linux distributions running on the Eeepc (previously ffinit.c). It's currently -able to boot an almost unmodified Mandriva Linux 2008.0/2008.1. +able to boot Mandriva Linux 2008.0/2008.1. See Makefile for configurable parameters to better suit your system. From c79b823f17f15769939210028090fc4d5b7b6bc3 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Thu, 20 Mar 2008 05:10:07 -0300 Subject: [PATCH 13/14] Fix default user setting in Makefile Otherwise the default user name is set to the name of the current user Signed-off-by: Claudio Matsuoka --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8d33e8af..1518126d 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ BINS = finit finit-mod finit-mdv #### Configurable parameters # Default user for finit-alt if not "user" -#USER=fred +#DEFUSER = fred # Add -DDEBUG to build with debug messages, also drops to terminal after X #CFLAGS += -DDEBUG @@ -37,8 +37,8 @@ CFLAGS += -DBUILTIN_RUNPARTS -ifneq ($(USER), "user") -CFLAGS += -DDEFUSER=\"$(USER)\" +ifneq ($(DEFUSER),) +CFLAGS += -DDEFUSER=\"$(DEFUSER)\" endif .c.o: From a3ad99798e6ade97a981adf5b4376e758c97b894 Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Thu, 20 Mar 2008 05:12:58 -0300 Subject: [PATCH 14/14] Don't mount dev as tmpfs Otherwise we won't be able to mount stuff Signed-off-by: Claudio Matsuoka --- finit-alt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/finit-alt.c b/finit-alt.c index b29a17cb..072cf66f 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -165,7 +165,6 @@ int main() umask(0); #ifdef MAKE_DEVICES - mount("udev", "/dev", "tmpfs", 0, "mode=0755"); mkdir("/dev/shm", 0755); mkdir("/dev/pts", 0755); #endif