]> err.no Git - util-linux/commitdiff
simpleinit: move old init stuff to separate directory
authorKarel Zak <kzak@redhat.com>
Fri, 10 Dec 2010 16:28:32 +0000 (17:28 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 10 Dec 2010 16:28:32 +0000 (17:28 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
17 files changed:
Makefile.am
configure.ac
login-utils/.gitignore
login-utils/Makefile.am
simpleinit/.gitignore [new file with mode: 0644]
simpleinit/Makefile.am [new file with mode: 0644]
simpleinit/fastboot.8 [moved from login-utils/fastboot.8 with 100% similarity]
simpleinit/fasthalt.8 [moved from login-utils/fasthalt.8 with 100% similarity]
simpleinit/halt.8 [moved from login-utils/halt.8 with 100% similarity]
simpleinit/initctl.8 [moved from login-utils/initctl.8 with 100% similarity]
simpleinit/initctl.c [moved from login-utils/initctl.c with 100% similarity]
simpleinit/reboot.8 [moved from login-utils/reboot.8 with 100% similarity]
simpleinit/shutdown.8 [moved from login-utils/shutdown.8 with 100% similarity]
simpleinit/shutdown.c [moved from login-utils/shutdown.c with 100% similarity]
simpleinit/simpleinit.8 [moved from login-utils/simpleinit.8 with 100% similarity]
simpleinit/simpleinit.c [moved from login-utils/simpleinit.c with 99% similarity]
simpleinit/simpleinit.h [moved from login-utils/simpleinit.h with 100% similarity]

index 616669d2c41767a71328d158880744fb71d00d08..368ded448ec15ce7a943edb32a878bb712b64869 100644 (file)
@@ -42,6 +42,10 @@ SUBDIRS += \
        partx
 endif
 
+if BUILD_INIT
+SUBDIRS += simpleinit
+endif
+
 if BUILD_MOUNT
 SUBDIRS += mount
 endif
index c2409037f3c84a04bf636fe62d7de2b842a85b8b..445d8d6404e928e0f2329c419c3cb1e2fd6192cb 100644 (file)
@@ -1144,6 +1144,7 @@ fsck/Makefile
 getopt/Makefile
 hwclock/Makefile
 include/Makefile
+simpleinit/Makefile
 lib/Makefile
 login-utils/Makefile
 Makefile
index 75d61202487b798371080a036cfe6d94dddc6b06..816d11397efaa1b685e46b1ed77f5e2b4087eb09 100644 (file)
@@ -7,8 +7,5 @@ chsh
 login
 newgrp
 vipw
-initctl
 last
-shutdown
-simpleinit
 mesg
index c5e3d52f9038b20cd1a77966a49126dc8afea52d..c490999d9525525f4be6871a976fbac12c56cf01 100644 (file)
@@ -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 (file)
index 0000000..f99b58a
--- /dev/null
@@ -0,0 +1,3 @@
+initctl
+shutdown
+simpleinit
diff --git a/simpleinit/Makefile.am b/simpleinit/Makefile.am
new file mode 100644 (file)
index 0000000..755e3a4
--- /dev/null
@@ -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
+
similarity index 100%
rename from login-utils/fastboot.8
rename to simpleinit/fastboot.8
similarity index 100%
rename from login-utils/fasthalt.8
rename to simpleinit/fasthalt.8
similarity index 100%
rename from login-utils/halt.8
rename to simpleinit/halt.8
similarity index 100%
rename from login-utils/initctl.8
rename to simpleinit/initctl.8
similarity index 100%
rename from login-utils/initctl.c
rename to simpleinit/initctl.c
similarity index 100%
rename from login-utils/reboot.8
rename to simpleinit/reboot.8
similarity index 100%
rename from login-utils/shutdown.8
rename to simpleinit/shutdown.8
similarity index 100%
rename from login-utils/shutdown.c
rename to simpleinit/shutdown.c
similarity index 99%
rename from login-utils/simpleinit.c
rename to simpleinit/simpleinit.c
index d1f62641a1ee28192ee935bd79b2e08e75656252..5d627c0dae2f6553c4e17ec71a8dd8aad48356aa 100644 (file)
 #ifdef SHADOW_PWD
 #  include <shadow.h>
 #endif
-#include "my_crypt.h"
+
+#if defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
+#include <crypt.h>
+#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 */