simple-init

A set of init binaries for linux
git clone git://depsterr.com/git/simple-init
Log | Files | Refs | README | LICENSE

commit b224bcce2e8727991dd2d65d998b5fc57744cbbd
parent 05dcf2431432000ebf56ea45597d580430df9f67
Author: depsterr <depsterr@protonmail.com>
Date:   Wed, 10 Jun 2020 17:11:43 +0200

trimmed source a bit

Diffstat:
Minitscripts/Makefile | 18+++++++++---------
Dinitscripts/config.h | 7-------
Minitscripts/init.c | 7-------
3 files changed, 9 insertions(+), 23 deletions(-)

diff --git a/initscripts/Makefile b/initscripts/Makefile @@ -1,18 +1,18 @@ include config.mk -default: ${INIT} ${SHUTDOWN} +default: $(INIT) $(SHUTDOWN) install: default - mkdir -p ${DESTDIR} - cp ${INIT} ${SHUTDOWN} ${DESTDIR} - chmod 755 ${DESTDIR}/${INIT} - chmod 755 ${DESTDIR}/${INIT} + mkdir -p $(DESTDIR) + cp $(INIT) $(SHUTDOWN) $(DESTDIR) + chmod 755 $(DESTDIR)/$(INIT) + chmod 755 $(DESTDIR)/$(INIT) clean: rm rc.* -${INIT}: init.c util.c - ${CC} $^ -o $@ +$(INIT): init.c util.c + $(CC) $^ -o $@ -${SHUTDOWN}: shutdown.c util.c - ${CC} $^ -o $@ +$(SHUTDOWN): shutdown.c util.c + $(CC) $^ -o $@ diff --git a/initscripts/config.h b/initscripts/config.h @@ -1,7 +0,0 @@ -/* - Change the contents of this file to do some basic configuration. - For more advanced configuration, change the source. -*/ - -#define GETTY -// #define AGETTY diff --git a/initscripts/init.c b/initscripts/init.c @@ -70,15 +70,8 @@ int main() { wait_for_children(); log_message("Boot completed, starting ttys"); -#if defined GETTY char* tty1[] = { "/bin/getty", "38400", "tty1", 0 }; char* tty2[] = { "/bin/getty", "38400", "tty2", 0 }; -#elif defined AGETTY - char* tty1[] = { "/bin/agetty", "38400", "tty1", 0 }; - char* tty2[] = { "/bin/agetty", "38400", "tty2", 0 }; -#else -#error "Not using getty nor agetty, please change the source manually to add support for your alternative." -#endif respawn_process(tty1); respawn_process(tty2); }