summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2010-12-10 17:28:32 +0100
committerKarel Zak <kzak@redhat.com>2010-12-10 17:28:32 +0100
commit5502d92b28e442c8b9294608eaf67df9127d11e9 (patch)
tree924b81cc9b93c860c1f72298b0afbe4100a50052
parentcda8458b4d1e6f2772b77a448b342806057f0a3a (diff)
downloadutil-linux-old-5502d92b28e442c8b9294608eaf67df9127d11e9.tar.gz
simpleinit: move old init stuff to separate directory
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--Makefile.am4
-rw-r--r--configure.ac1
-rw-r--r--login-utils/.gitignore3
-rw-r--r--login-utils/Makefile.am33
-rw-r--r--simpleinit/.gitignore3
-rw-r--r--simpleinit/Makefile.am27
-rw-r--r--simpleinit/fastboot.8 (renamed from login-utils/fastboot.8)0
-rw-r--r--simpleinit/fasthalt.8 (renamed from login-utils/fasthalt.8)0
-rw-r--r--simpleinit/halt.8 (renamed from login-utils/halt.8)0
-rw-r--r--simpleinit/initctl.8 (renamed from login-utils/initctl.8)0
-rw-r--r--simpleinit/initctl.c (renamed from login-utils/initctl.c)0
-rw-r--r--simpleinit/reboot.8 (renamed from login-utils/reboot.8)0
-rw-r--r--simpleinit/shutdown.8 (renamed from login-utils/shutdown.8)0
-rw-r--r--simpleinit/shutdown.c (renamed from login-utils/shutdown.c)0
-rw-r--r--simpleinit/simpleinit.8 (renamed from login-utils/simpleinit.8)0
-rw-r--r--simpleinit/simpleinit.c (renamed from login-utils/simpleinit.c)7
-rw-r--r--simpleinit/simpleinit.h (renamed from login-utils/simpleinit.h)0
17 files changed, 41 insertions, 37 deletions
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
index 386d9715..386d9715 100644
--- a/login-utils/fastboot.8
+++ b/simpleinit/fastboot.8
diff --git a/login-utils/fasthalt.8 b/simpleinit/fasthalt.8
index 386d9715..386d9715 100644
--- a/login-utils/fasthalt.8
+++ b/simpleinit/fasthalt.8
diff --git a/login-utils/halt.8 b/simpleinit/halt.8
index 386d9715..386d9715 100644
--- a/login-utils/halt.8
+++ b/simpleinit/halt.8
diff --git a/login-utils/initctl.8 b/simpleinit/initctl.8
index 7e92dea6..7e92dea6 100644
--- a/login-utils/initctl.8
+++ b/simpleinit/initctl.8
diff --git a/login-utils/initctl.c b/simpleinit/initctl.c
index 3b38b496..3b38b496 100644
--- a/login-utils/initctl.c
+++ b/simpleinit/initctl.c
diff --git a/login-utils/reboot.8 b/simpleinit/reboot.8
index 386d9715..386d9715 100644
--- a/login-utils/reboot.8
+++ b/simpleinit/reboot.8
diff --git a/login-utils/shutdown.8 b/simpleinit/shutdown.8
index 371310b6..371310b6 100644
--- a/login-utils/shutdown.8
+++ b/simpleinit/shutdown.8
diff --git a/login-utils/shutdown.c b/simpleinit/shutdown.c
index 9bb121cf..9bb121cf 100644
--- a/login-utils/shutdown.c
+++ b/simpleinit/shutdown.c
diff --git a/login-utils/simpleinit.8 b/simpleinit/simpleinit.8
index c253e8b5..c253e8b5 100644
--- a/login-utils/simpleinit.8
+++ b/simpleinit/simpleinit.8
diff --git a/login-utils/simpleinit.c b/simpleinit/simpleinit.c
index d1f62641..5d627c0d 100644
--- a/login-utils/simpleinit.c
+++ b/simpleinit/simpleinit.c
@@ -42,13 +42,18 @@
#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 */
diff --git a/login-utils/simpleinit.h b/simpleinit/simpleinit.h
index 1d876297..1d876297 100644
--- a/login-utils/simpleinit.h
+++ b/simpleinit/simpleinit.h