diff options
Diffstat (limited to 'remote/modules/rsyslogd')
-rw-r--r-- | remote/modules/rsyslogd/module.build | 34 | ||||
-rw-r--r-- | remote/modules/rsyslogd/module.conf | 6 | ||||
-rw-r--r-- | remote/modules/rsyslogd/module.conf.debian | 6 | ||||
-rw-r--r-- | remote/modules/rsyslogd/module.conf.opensuse | 9 | ||||
-rw-r--r-- | remote/modules/rsyslogd/module.conf.ubuntu | 6 |
5 files changed, 61 insertions, 0 deletions
diff --git a/remote/modules/rsyslogd/module.build b/remote/modules/rsyslogd/module.build new file mode 100644 index 00000000..c35d07b7 --- /dev/null +++ b/remote/modules/rsyslogd/module.build @@ -0,0 +1,34 @@ +fetch_source() { + : +} + +build() { + COPYLIST="list_dpkg_output" + [ -e "$COPYLIST" ] && rm "$COPYLIST" + + list_packet_files >> "$COPYLIST" + tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" + + return 0 +} + +post_copy() { + + + # pwd = module's build dir + mkdir -p "${TARGET_BUILD_DIR}"/var/spool/rsyslog + + local RSL="$(find /usr/lib/ /lib/ -name rsyslog.service | head -1)" + [ -z "$RSL" -o ! -e "$RSL" ] && perror "rsyslog.service not found on vorlage" + [ ! -d "$TARGET_BUILD_DIR/etc/systemd/system" ] && mkdir -p "$TARGET_BUILD_DIR/etc/systemd/system" + cp -L "$RSL" "$TARGET_BUILD_DIR/etc/systemd/system/" + sed -i 's/\/bin\/systemctl/-\/usr\/bin\/systemctl/g' "${TARGET_BUILD_DIR}"/etc/systemd/system/rsyslog.service + sed -i 's/^Before=udev/#&/' "${TARGET_BUILD_DIR}"/etc/systemd/system/rsyslog.service + + # activate the service + ln -sf rsyslog.service "${TARGET_BUILD_DIR}"/etc/systemd/system/syslog.service + [ ! -d "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants ] && mkdir -p "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants + ln -sf ../syslog.service "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants/syslog.service + # TODO: more checks + sed -i.bak '/^After\=var-run.mount/d;/^Requires\=var-run.mount/d;/^Before\=syslog.target/d' "$TARGET_BUILD_DIR/etc/systemd/system/rsyslog.service" +} diff --git a/remote/modules/rsyslogd/module.conf b/remote/modules/rsyslogd/module.conf new file mode 100644 index 00000000..ba36aadf --- /dev/null +++ b/remote/modules/rsyslogd/module.conf @@ -0,0 +1,6 @@ +REQUIRED_BINARIES=" + rsyslogd +" +REQUIRED_FILES=" + /etc/rsyslog.conf +" diff --git a/remote/modules/rsyslogd/module.conf.debian b/remote/modules/rsyslogd/module.conf.debian new file mode 100644 index 00000000..79aba761 --- /dev/null +++ b/remote/modules/rsyslogd/module.conf.debian @@ -0,0 +1,6 @@ +REQUIRED_CONTENT_PACKAGES=" + rsyslog +" +REQUIRED_DIRECTORIES=" + /usr/lib/rsyslog +" diff --git a/remote/modules/rsyslogd/module.conf.opensuse b/remote/modules/rsyslogd/module.conf.opensuse new file mode 100644 index 00000000..51ce0e47 --- /dev/null +++ b/remote/modules/rsyslogd/module.conf.opensuse @@ -0,0 +1,9 @@ +REQUIRED_CONTENT_PACKAGES=" + rsyslog +" +REQUIRED_BINARIES+=" + rsyslog-service-prepare +" +REQUIRED_DIRECTORIES=" + /usr/$LIB64/rsyslog +" diff --git a/remote/modules/rsyslogd/module.conf.ubuntu b/remote/modules/rsyslogd/module.conf.ubuntu new file mode 100644 index 00000000..79aba761 --- /dev/null +++ b/remote/modules/rsyslogd/module.conf.ubuntu @@ -0,0 +1,6 @@ +REQUIRED_CONTENT_PACKAGES=" + rsyslog +" +REQUIRED_DIRECTORIES=" + /usr/lib/rsyslog +" |