mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
Setup standard FHS 2.3 structure in /var
This was missing from the 1.4 release due to it being hidden in one of my private plugins. Sorry! Also, add another log macro. Warnings are quite useful things to have. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
1.5 (UNRELEASED)
|
||||
- Use bootmisc plugin to setup standard FHS 2.3 structure in /var
|
||||
- Added FLOG_WARN() syslog macro, for plugins
|
||||
|
||||
1.4 (20121002)
|
||||
- Fix I/O plugin watcher and load plugins earlier for a new hook
|
||||
- Start refactoring helpers.c into a libite.so (-lite). This
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
}
|
||||
|
||||
#define FLOG_DEBUG(fmt, args...) DO_LOG(LOG_DEBUG, fmt, ##args)
|
||||
#define FLOG_WARN(fmt, args...) DO_LOG(LOG_WARNING, fmt, ##args)
|
||||
#define FLOG_ERROR(fmt, args...) DO_LOG(LOG_CRIT, fmt, ##args)
|
||||
#define FLOG_PERROR(fmt, args...) DO_LOG(LOG_CRIT, fmt ". Error %d: %s", ##args, errno, strerror(errno))
|
||||
|
||||
|
||||
@@ -28,12 +28,32 @@
|
||||
#include "helpers.h"
|
||||
#include "plugin.h"
|
||||
|
||||
/*
|
||||
* Setup standard FHS 2.3 structure in /var, and
|
||||
* write runlevel to UTMP, needed by, e.g., printerdrake.
|
||||
*/
|
||||
static void setup(void *UNUSED(arg))
|
||||
{
|
||||
#ifdef RUNLEVEL
|
||||
struct utmp entry;
|
||||
#endif
|
||||
|
||||
_d("Setting up FHS structure in /var ...");
|
||||
mkdir("/var/cache", 0755);
|
||||
mkdir("/var/games", 0755);
|
||||
mkdir("/var/lib", 0755);
|
||||
mkdir("/var/lib/misc", 0755);
|
||||
mkdir("/var/lib/alarm", 0755);
|
||||
mkdir("/var/lock", 0755);
|
||||
mkdir("/var/log", 0755);
|
||||
mkdir("/var/mail", 0755);
|
||||
mkdir("/var/opt", 0755);
|
||||
mkdir("/var/run", 0755);
|
||||
mkdir("/var/spool", 0755);
|
||||
mkdir("/var/spool/cron", 0755);
|
||||
mkdir("/var/tmp", 0755);
|
||||
mkdir("/var/empty", 0755);
|
||||
|
||||
_d("Setting up necessary UTMP files ...");
|
||||
touch("/var/run/utmp");
|
||||
chown("/var/run/utmp", 0, getgroup("utmp"));
|
||||
@@ -55,6 +75,10 @@ static void setup(void *UNUSED(arg))
|
||||
#endif
|
||||
|
||||
_d("Setting up misc files ...");
|
||||
mkdir("/var/run/lldpd", 0755); /* Needed by lldpd */
|
||||
mkdir("/var/run/pluto", 0755); /* Needed by Openswan */
|
||||
mkdir("/var/run/quagga", 0755); /* Needed by Quagga */
|
||||
mkdir("/var/log/quagga", 0755); /* Needed by Quagga */
|
||||
mkdir("/var/run/sshd", 01755); /* OpenSSH */
|
||||
mkfifo("/dev/xconsole", 0640); /* sysklogd */
|
||||
chown("/dev/xconsole", 0, getgroup("tty"));
|
||||
|
||||
Reference in New Issue
Block a user