diff --git a/Changelog b/Changelog index 59dd5592..49951203 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ O.4 () - create /dev/initctl fifo in finit-alt (for reboot) + - default username for finit-alt configurable in Makefile 0.3 (20080223) - Change poweroff method to reboot(RB_POWER_OFF) (Metalshark) diff --git a/Makefile b/Makefile index 1b5f22b7..b01bc957 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,12 @@ DFILES = Makefile README finit.c finit-mod.c finit-alt.c helpers.c helpers.h BINS = finit finit-mod finit-mdv + #### Configurable parameters +# Default user for finit-alt if not "user" +#USER=fred + # Add -DDEBUG to build with debug messages, also drops to terminal after X #CFLAGS += -DDEBUG @@ -20,6 +24,7 @@ BINS = finit finit-mod finit-mdv 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 @@ -27,6 +32,9 @@ CFLAGS += -march=pentium-m # and CONFIG_HPET_RTC_IRQ. #CFLAGS += -DDIRECTISA +ifneq ($(USER), "user") +CFLAGS += -DDEFUSER=\"$(USER)\" +endif .c.o: diff --git a/finit-alt.c b/finit-alt.c index 122d34a4..58ef8eff 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -48,6 +48,10 @@ THE SOFTWARE. #define debug(x...) #endif +#ifndef DEFUSER +#define DEFUSER "user" +#endif + /* Distribution configuration */ #ifdef DIST_MDV /* Mandriva */ @@ -55,9 +59,6 @@ THE SOFTWARE. #define SYSROOT "/sysroot" #define GETTY "/sbin/mingetty tty3" #define RUNPARTS "/usr/bin/run-parts --arg=-i" -#define DEFUSER "user" -#define HOMEDEV "/dev/sda6" -#define AGPDRV "intel-agp" #define REMOUNT_ROOTFS_RW #define MAKE_DEVICES #else /* original Eeepc distribution */ @@ -65,7 +66,6 @@ THE SOFTWARE. #define SYSROOT "/mnt" #define GETTY "/sbin/getty 38400 tty3" #define RUNPARTS "/bin/run-parts --arg=-i" -#define DEFUSER "user" #define TOUCH_ETC_NETWORK_RUN_IFSTATE #endif