Make it possible to distribute finit.h in 'make dev-install'

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2015-06-22 15:12:20 +02:00
1 parent 9a6ab331a6
commit f1807a32ca
9 files changed
+21 -9

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ ARCHTOOL = `which git-archive-all`
ARCHIVE = $(PKG).tar ARCHIVE = $(PKG).tar
ARCHIVEZ = ../$(ARCHIVE).xz ARCHIVEZ = ../$(ARCHIVE).xz
EXEC = finit initctl reboot EXEC = finit initctl reboot
HEADERS = plugin.h svc.h inetd.h helpers.h queue.h HEADERS = finit.h plugin.h svc.h inetd.h helpers.h queue.h
DISTFILES = LICENSE README CHANGELOG finit.conf services DISTFILES = LICENSE README CHANGELOG finit.conf services
OBJS = finit.o api.o client.o conf.o exec.o helpers.o pid.o sig.o \ OBJS = finit.o api.o client.o conf.o exec.o helpers.o pid.o sig.o \
svc.o service.o plugin.o tty.o inetd.o svc.o service.o plugin.o tty.o inetd.o
+2
View File
@@ -22,6 +22,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "config.h" /* Generated by configure script */
#include <ctype.h> #include <ctype.h>
#include <getopt.h> #include <getopt.h>
#include <stdio.h> #include <stdio.h>
+2
View File
@@ -21,6 +21,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "config.h" /* Generated by configure script */
#include <ctype.h> #include <ctype.h>
#include <dirent.h> #include <dirent.h>
#include <string.h> #include <string.h>
Vendored
+8
View File
@@ -27,6 +27,7 @@ defaults()
confdir=${confdir:="finit.d"} confdir=${confdir:="finit.d"}
rcsd=${rcsd:="$sysconfdir/$confdir"} rcsd=${rcsd:="$sysconfdir/$confdir"}
console=${console:='_PATH_CONSOLE'} console=${console:='_PATH_CONSOLE'}
shell=${shell:='_PATH_BSHELL'}
defuser=${defuser:="root"} defuser=${defuser:="root"}
defhost=${defhost:="noname"} defhost=${defhost:="noname"}
runlevel=${runlevel:=2} runlevel=${runlevel:=2}
@@ -56,6 +57,7 @@ result()
echo "Config file : $config" echo "Config file : $config"
echo "rcs.d/ directory : $rcsd" echo "rcs.d/ directory : $rcsd"
echo "Default console : $console" echo "Default console : $console"
# echo "Fallback shell : $shell"
if [ x"$sysroot" != x"" ]; then if [ x"$sysroot" != x"" ]; then
echo "Swap rootfs to : $sysroot" echo "Swap rootfs to : $sysroot"
fi fi
@@ -143,6 +145,7 @@ usage()
echo " defaults to all plugins. Exclude extension!" echo " defaults to all plugins. Exclude extension!"
echo " --with-rcsd=RCSD Finit RCSD directory, default '\$sysconfdir/$confdir'" echo " --with-rcsd=RCSD Finit RCSD directory, default '\$sysconfdir/$confdir'"
echo " --with-console=DEV Console to use, default: /dev/console" echo " --with-console=DEV Console to use, default: /dev/console"
# echo " --with-shell=PATH Fallback shell to use, default: /bin/sh"
echo " --with-sysroot=PATH Some distributions keep a different (writable) rootfs" echo " --with-sysroot=PATH Some distributions keep a different (writable) rootfs"
echo " that is used at runtime, usually /sysroot or /mnt" echo " that is used at runtime, usually /sysroot or /mnt"
echo " --with-username=USER User for 'startx' .conf option, default: root" echo " --with-username=USER User for 'startx' .conf option, default: root"
@@ -228,6 +231,10 @@ while [ "$*" != "" ]; do
console="\"$arg\"" console="\"$arg\""
;; ;;
with-shell)
shell="\"$arg\""
;;
with-sysroot) with-sysroot)
sysroot="$arg" sysroot="$arg"
;; ;;
@@ -380,6 +387,7 @@ echo "#define FINIT_FIFO \"$fifo\"" >> config.h
echo "#define FINIT_CONF \"$config\"" >> config.h echo "#define FINIT_CONF \"$config\"" >> config.h
echo "#define FINIT_RCSD \"$rcsd\"" >> config.h echo "#define FINIT_RCSD \"$rcsd\"" >> config.h
echo "#define CONSOLE $console" >> config.h echo "#define CONSOLE $console" >> config.h
echo "#define FALLBACK_SHELL $shell" >> config.h
if [ x"$sysroot" != x"" ]; then if [ x"$sysroot" != x"" ]; then
echo "#define SYSROOT \"$sysroot\"" >> config.h echo "#define SYSROOT \"$sysroot\"" >> config.h
fi fi
+2
View File
@@ -22,6 +22,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "config.h" /* Generated by configure script */
#include <ctype.h> /* isdigit() */ #include <ctype.h> /* isdigit() */
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
+2
View File
@@ -22,6 +22,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "config.h" /* Generated by configure script */
#include <sys/mount.h> #include <sys/mount.h>
#include <ctype.h> #include <ctype.h>
#include <dirent.h> #include <dirent.h>
-8
View File
@@ -25,8 +25,6 @@
#ifndef FINIT_H_ #ifndef FINIT_H_
#define FINIT_H_ #define FINIT_H_
#include "config.h" /* Generated by configure script */
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <paths.h> #include <paths.h>
@@ -36,12 +34,6 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
/* If the user configures us to not know about any getty use the system
* defined /bin/sh (or similar) as fallback for TTYs. */
#ifndef FALLBACK_SHELL
# define FALLBACK_SHELL _PATH_BSHELL
#endif
#define CMD_SIZE 256 #define CMD_SIZE 256
#define LINE_SIZE 1024 #define LINE_SIZE 1024
#define BUF_SIZE 4096 #define BUF_SIZE 4096
+2
View File
@@ -22,6 +22,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "../config.h" /* Generated by configure script */
#include <errno.h> #include <errno.h>
#include <fcntl.h> /* O_RDONLY et al */ #include <fcntl.h> /* O_RDONLY et al */
#include <signal.h> #include <signal.h>
+2
View File
@@ -22,6 +22,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "config.h" /* Generated by configure script */
#include <string.h> #include <string.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <net/if.h> #include <net/if.h>