mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Add option to use built-in run-parts instead of /bin/run-parts
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
This commit is contained in:
1 parent
6371f82fea
commit
434ec4c533
6 files changed
+19
-7
No files matched your search
@@ -2,6 +2,7 @@ O.4 ()
|
|||||||
- create /dev/initctl fifo in finit-alt (for reboot)
|
- create /dev/initctl fifo in finit-alt (for reboot)
|
||||||
- default username for finit-alt configurable in Makefile
|
- default username for finit-alt configurable in Makefile
|
||||||
- create loopback device node in finit-alt (for squashfs)
|
- create loopback device node in finit-alt (for squashfs)
|
||||||
|
- add option to use built-in run-parts instead of /bin/run-parts
|
||||||
|
|
||||||
0.3 (20080223)
|
0.3 (20080223)
|
||||||
- Change poweroff method to reboot(RB_POWER_OFF) (Metalshark)
|
- Change poweroff method to reboot(RB_POWER_OFF) (Metalshark)
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ CFLAGS += -march=pentium-m
|
|||||||
# and CONFIG_HPET_RTC_IRQ.
|
# and CONFIG_HPET_RTC_IRQ.
|
||||||
#CFLAGS += -DDIRECTISA
|
#CFLAGS += -DDIRECTISA
|
||||||
|
|
||||||
|
# Use built-in run-parts instead of /bin/run-parts
|
||||||
|
#CFLAGS += BUILTIN_RUNPARTS
|
||||||
|
|
||||||
ifneq ($(USER), "user")
|
ifneq ($(USER), "user")
|
||||||
CFLAGS += -DDEFUSER=\"$(USER)\"
|
CFLAGS += -DDEFUSER=\"$(USER)\"
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -235,7 +235,11 @@ int main()
|
|||||||
touch("/etc/resolvconf/run/enable-updates");
|
touch("/etc/resolvconf/run/enable-updates");
|
||||||
|
|
||||||
chdir("/etc/resolvconf/run/interface");
|
chdir("/etc/resolvconf/run/interface");
|
||||||
|
#ifdef BUILTIN_RUNPARTS
|
||||||
|
run_parts("/etc/resolvconf/update.d", "-i", NULL);
|
||||||
|
#else
|
||||||
system(RUNPARTS " --arg=i /etc/resolvconf/update.d");
|
system(RUNPARTS " --arg=i /etc/resolvconf/update.d");
|
||||||
|
#endif
|
||||||
chdir("/");
|
chdir("/");
|
||||||
|
|
||||||
#ifdef TOUCH_ETC_NETWORK_RUN_IFSTATE
|
#ifdef TOUCH_ETC_NETWORK_RUN_IFSTATE
|
||||||
|
|||||||
@@ -189,7 +189,11 @@ int main()
|
|||||||
touch("/etc/resolvconf/run/enable-updates");
|
touch("/etc/resolvconf/run/enable-updates");
|
||||||
|
|
||||||
chdir("/etc/resolvconf/run/interface");
|
chdir("/etc/resolvconf/run/interface");
|
||||||
|
#ifdef BUILTIN_RUNPARTS
|
||||||
|
run_parts("/etc/resolvconf/update.d", "-i", NULL);
|
||||||
|
#else
|
||||||
system("/bin/run-parts --arg=-i /etc/resolvconf/update.d");
|
system("/bin/run-parts --arg=-i /etc/resolvconf/update.d");
|
||||||
|
#endif
|
||||||
chdir("/");
|
chdir("/");
|
||||||
|
|
||||||
touch("/etc/network/run/ifstate");
|
touch("/etc/network/run/ifstate");
|
||||||
|
|||||||
@@ -10,8 +10,11 @@
|
|||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#ifdef BUILTIN_RUNPARTS
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
|
||||||
@@ -93,13 +96,7 @@ void copyfile(char *src, char *dst, int size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#ifdef BUILTIN_RUNPARTS
|
||||||
|
|
||||||
/* Running the system /bin/run-parts is good enough, enable this if you
|
|
||||||
can't use it. Some distributions have it under /usr/bin, in this case
|
|
||||||
you can assume that the distribution is broken or run-parts is not used
|
|
||||||
in the boot process.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NUM_SCRIPTS 128 /* ought to be enough for anyone */
|
#define NUM_SCRIPTS 128 /* ought to be enough for anyone */
|
||||||
#define NUM_ARGS 16
|
#define NUM_ARGS 16
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
int makepath (char *);
|
int makepath (char *);
|
||||||
void ifconfig (char *, char *, char *, int);
|
void ifconfig (char *, char *, char *, int);
|
||||||
void copyfile (char *, char *, int);
|
void copyfile (char *, char *, int);
|
||||||
|
|
||||||
|
#ifdef BUILTIN_RUNPARTS
|
||||||
int run_parts (char *, ...);
|
int run_parts (char *, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
Reference in new issue
Block a user