From 5502d92b28e442c8b9294608eaf67df9127d11e9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 10 Dec 2010 17:28:32 +0100 Subject: [PATCH] simpleinit: move old init stuff to separate directory Signed-off-by: Karel Zak --- Makefile.am | 4 +++ configure.ac | 1 + login-utils/.gitignore | 3 --- login-utils/Makefile.am | 33 ------------------------ simpleinit/.gitignore | 3 +++ simpleinit/Makefile.am | 27 +++++++++++++++++++ {login-utils => simpleinit}/fastboot.8 | 0 {login-utils => simpleinit}/fasthalt.8 | 0 {login-utils => simpleinit}/halt.8 | 0 {login-utils => simpleinit}/initctl.8 | 0 {login-utils => simpleinit}/initctl.c | 0 {login-utils => simpleinit}/reboot.8 | 0 {login-utils => simpleinit}/shutdown.8 | 0 {login-utils => simpleinit}/shutdown.c | 0 {login-utils => simpleinit}/simpleinit.8 | 0 {login-utils => simpleinit}/simpleinit.c | 7 ++++- {login-utils => simpleinit}/simpleinit.h | 0 17 files changed, 41 insertions(+), 37 deletions(-) create mode 100644 simpleinit/.gitignore create mode 100644 simpleinit/Makefile.am rename {login-utils => simpleinit}/fastboot.8 (100%) rename {login-utils => simpleinit}/fasthalt.8 (100%) rename {login-utils => simpleinit}/halt.8 (100%) rename {login-utils => simpleinit}/initctl.8 (100%) rename {login-utils => simpleinit}/initctl.c (100%) rename {login-utils => simpleinit}/reboot.8 (100%) rename {login-utils => simpleinit}/shutdown.8 (100%) rename {login-utils => simpleinit}/shutdown.c (100%) rename {login-utils => simpleinit}/simpleinit.8 (100%) rename {login-utils => simpleinit}/simpleinit.c (99%) rename {login-utils => simpleinit}/simpleinit.h (100%) diff --git a/Makefile.am b/Makefile.am index 616669d2..368ded44 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,6 +42,10 @@ SUBDIRS += \ partx endif +if BUILD_INIT +SUBDIRS += simpleinit +endif + if BUILD_MOUNT SUBDIRS += mount endif diff --git a/configure.ac b/configure.ac index c2409037..445d8d64 100644 --- a/configure.ac +++ b/configure.ac @@ -1144,6 +1144,7 @@ fsck/Makefile getopt/Makefile hwclock/Makefile include/Makefile +simpleinit/Makefile lib/Makefile login-utils/Makefile Makefile diff --git a/login-utils/.gitignore b/login-utils/.gitignore index 75d61202..816d1139 100644 --- a/login-utils/.gitignore +++ b/login-utils/.gitignore @@ -7,8 +7,5 @@ chsh login newgrp vipw -initctl last -shutdown -simpleinit mesg diff --git a/login-utils/Makefile.am b/login-utils/Makefile.am index c5e3d52f..c490999d 100644 --- a/login-utils/Makefile.am +++ b/login-utils/Makefile.am @@ -17,21 +17,6 @@ agetty_SOURCES += $(top_srcdir)/lib/langinfo.c endif endif -if BUILD_INIT - -sbin_PROGRAMS += simpleinit shutdown initctl -dist_man_MANS += fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \ - initctl.8 - -simpleinit_SOURCES = simpleinit.c my_crypt.h simpleinit.h -initctl_SOURCES = initctl.c simpleinit.h - -if NEED_LIBCRYPT -simpleinit_LDADD = -lcrypt -endif - -endif # BUILD_INIT - if BUILD_LAST usrbin_exec_PROGRAMS += last dist_man_MANS += last.1 @@ -118,24 +103,6 @@ endif endif endif -if BUILD_INIT - -install-exec-hook:: - cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot - cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot - cd $(DESTDIR)$(sbindir) && ln -sf shutdown halt - cd $(DESTDIR)$(sbindir) && ln -sf shutdown fasthalt - cd $(DESTDIR)$(sbindir) && ln -sf initctl need - cd $(DESTDIR)$(sbindir) && ln -sf initctl display-services - cd $(DESTDIR)$(sbindir) && ln -sf initctl provide - -install-data-hook: - cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 need.8 - cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 display-services.8 - cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 provide.8 - -endif - noinst_PROGRAMS = checktty_test islocal_test checktty_test_SOURCES = checktty.c login.h checktty_test_CPPFLAGS = -DMAIN_TEST_CHECKTTY $(AM_CPPFLAGS) diff --git a/simpleinit/.gitignore b/simpleinit/.gitignore new file mode 100644 index 00000000..f99b58a8 --- /dev/null +++ b/simpleinit/.gitignore @@ -0,0 +1,3 @@ +initctl +shutdown +simpleinit diff --git a/simpleinit/Makefile.am b/simpleinit/Makefile.am new file mode 100644 index 00000000..755e3a49 --- /dev/null +++ b/simpleinit/Makefile.am @@ -0,0 +1,27 @@ +include $(top_srcdir)/config/include-Makefile.am + +sbin_PROGRAMS = simpleinit shutdown initctl +dist_man_MANS = fastboot.8 fasthalt.8 halt.8 reboot.8 simpleinit.8 shutdown.8 \ + initctl.8 + +simpleinit_SOURCES = simpleinit.c my_crypt.h simpleinit.h +initctl_SOURCES = initctl.c simpleinit.h + +if NEED_LIBCRYPT +simpleinit_LDADD = -lcrypt +endif + +install-exec-hook:: + cd $(DESTDIR)$(sbindir) && ln -sf shutdown reboot + cd $(DESTDIR)$(sbindir) && ln -sf shutdown fastboot + cd $(DESTDIR)$(sbindir) && ln -sf shutdown halt + cd $(DESTDIR)$(sbindir) && ln -sf shutdown fasthalt + cd $(DESTDIR)$(sbindir) && ln -sf initctl need + cd $(DESTDIR)$(sbindir) && ln -sf initctl display-services + cd $(DESTDIR)$(sbindir) && ln -sf initctl provide + +install-data-hook: + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 need.8 + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 display-services.8 + cd $(DESTDIR)$(mandir)/man8 && ln -sf initctl.8 provide.8 + diff --git a/login-utils/fastboot.8 b/simpleinit/fastboot.8 similarity index 100% rename from login-utils/fastboot.8 rename to simpleinit/fastboot.8 diff --git a/login-utils/fasthalt.8 b/simpleinit/fasthalt.8 similarity index 100% rename from login-utils/fasthalt.8 rename to simpleinit/fasthalt.8 diff --git a/login-utils/halt.8 b/simpleinit/halt.8 similarity index 100% rename from login-utils/halt.8 rename to simpleinit/halt.8 diff --git a/login-utils/initctl.8 b/simpleinit/initctl.8 similarity index 100% rename from login-utils/initctl.8 rename to simpleinit/initctl.8 diff --git a/login-utils/initctl.c b/simpleinit/initctl.c similarity index 100% rename from login-utils/initctl.c rename to simpleinit/initctl.c diff --git a/login-utils/reboot.8 b/simpleinit/reboot.8 similarity index 100% rename from login-utils/reboot.8 rename to simpleinit/reboot.8 diff --git a/login-utils/shutdown.8 b/simpleinit/shutdown.8 similarity index 100% rename from login-utils/shutdown.8 rename to simpleinit/shutdown.8 diff --git a/login-utils/shutdown.c b/simpleinit/shutdown.c similarity index 100% rename from login-utils/shutdown.c rename to simpleinit/shutdown.c diff --git a/login-utils/simpleinit.8 b/simpleinit/simpleinit.8 similarity index 100% rename from login-utils/simpleinit.8 rename to simpleinit/simpleinit.8 diff --git a/login-utils/simpleinit.c b/simpleinit/simpleinit.c similarity index 99% rename from login-utils/simpleinit.c rename to simpleinit/simpleinit.c index d1f62641..5d627c0d 100644 --- a/login-utils/simpleinit.c +++ b/simpleinit/simpleinit.c @@ -42,13 +42,18 @@ #ifdef SHADOW_PWD # include #endif -#include "my_crypt.h" + +#if defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1 +#include +#endif + #include "pathnames.h" #include "linux_reboot.h" #include "strutils.h" #include "nls.h" #include "simpleinit.h" + #define CMDSIZ 150 /* max size of a line in inittab */ #define NUMCMD 30 /* max number of lines in inittab */ #define NUMTOK 20 /* max number of tokens in inittab command */ diff --git a/login-utils/simpleinit.h b/simpleinit/simpleinit.h similarity index 100% rename from login-utils/simpleinit.h rename to simpleinit/simpleinit.h -- 2.39.5