diff options
| author | Jonathan Bauer | 2013-03-14 18:30:10 +0100 |
|---|---|---|
| committer | Jonathan Bauer | 2013-03-14 18:30:10 +0100 |
| commit | 765e0502c315d250ab8f671bc726fef6f63a026a (patch) | |
| tree | e5624ec583c98fd3202caefad9b37289d9cad348 /remote/modules/rsyslogd | |
| parent | base -> base32 and started new base31 (diff) | |
| download | tm-scripts-765e0502c315d250ab8f671bc726fef6f63a026a.tar.gz tm-scripts-765e0502c315d250ab8f671bc726fef6f63a026a.tar.xz tm-scripts-765e0502c315d250ab8f671bc726fef6f63a026a.zip | |
restructuring...
Diffstat (limited to 'remote/modules/rsyslogd')
| -rw-r--r-- | remote/modules/rsyslogd/rsyslogd.build | 38 | ||||
| -rw-r--r-- | remote/modules/rsyslogd/rsyslogd.conf | 4 |
2 files changed, 42 insertions, 0 deletions
diff --git a/remote/modules/rsyslogd/rsyslogd.build b/remote/modules/rsyslogd/rsyslogd.build new file mode 100644 index 00000000..43aa112d --- /dev/null +++ b/remote/modules/rsyslogd/rsyslogd.build @@ -0,0 +1,38 @@ +fetch_source() { + : +} + +build() { + + FILELIST="list_binaries_and_files" + BIN_LOCATION=$(which rsyslogd) + if [ ! -z ${BIN_LOCATION} -a -e ${BIN_LOCATION} ]; + then + get_link_chain "${BIN_LOCATION}" >> "${FILELIST}" + else + perror "${BIN} not found on the system! Please install it." + exit 1 + fi + + for ENTRY in ${REQUIRED_FILES} ${REQUIRED_DIRECTORIES}; do + get_link_chain "${ENTRY}" >> "${FILELIST}" + done + + tarcopy "$(cat ${FILELIST}|sort -u)" "${MODULE_BUILD_DIR}" + +} + +post_copy() { + mkdir -p "${TARGET_BUILD_DIR}"/var/spool/rsyslog + + [ -e /lib/systemd/system/rsyslog.service ] \ + && cp /lib/systemd/system/rsyslog.service "${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 -s 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 -s ../syslog.service "${TARGET_BUILD_DIR}"/etc/systemd/system/basic.target.wants/syslog.service + +} diff --git a/remote/modules/rsyslogd/rsyslogd.conf b/remote/modules/rsyslogd/rsyslogd.conf new file mode 100644 index 00000000..20b5df1b --- /dev/null +++ b/remote/modules/rsyslogd/rsyslogd.conf @@ -0,0 +1,4 @@ +REQUIRED_BINARIES=" rsyslogd" +REQUIRED_FILES=" /etc/rsyslog.conf" +REQUIRED_DIRECTORIES=" /etc/rsyslog.d + /usr/lib/rsyslog" |
