simpleinit: move old init stuff to separate directory

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2010-12-10 17:28:32 +01:00
parent cda8458b4d
commit 5502d92b28
17 changed files with 41 additions and 37 deletions

View File

@ -42,6 +42,10 @@ SUBDIRS += \
partx
endif
if BUILD_INIT
SUBDIRS += simpleinit
endif
if BUILD_MOUNT
SUBDIRS += mount
endif

View File

@ -1144,6 +1144,7 @@ fsck/Makefile
getopt/Makefile
hwclock/Makefile
include/Makefile
simpleinit/Makefile
lib/Makefile
login-utils/Makefile
Makefile

View File

@ -7,8 +7,5 @@ chsh
login
newgrp
vipw
initctl
last
shutdown
simpleinit
mesg

View 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)

3
simpleinit/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
initctl
shutdown
simpleinit

27
simpleinit/Makefile.am Normal file
View File

@ -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

View File

@ -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 */