The following changes were made:
* Added defaults file in usr/share/sysklogd (managed by usher) * Added init script * Added syslog.conf (managed by usher)
This commit is contained in:
23
SNAP/usher
23
SNAP/usher
@@ -2,22 +2,25 @@
|
||||
|
||||
set -e
|
||||
|
||||
CONF="auth,authpriv.* -/var/log/auth.log
|
||||
*.*;auth,authpriv.none -/var/log/sys.log
|
||||
daemon.* -/var/log/daemon.log
|
||||
kern.* -/var/log/kern.log
|
||||
mail.* -/var/log/mail.log
|
||||
user.* -/var/log/user.log
|
||||
#*.emerg *
|
||||
*.emerg -/var/log/kern.log"
|
||||
|
||||
case $1 in
|
||||
preinst)
|
||||
exit 0
|
||||
;;
|
||||
postinst)
|
||||
if [ ! -f ${TARGET}/etc/syslog.conf ]; then
|
||||
echo "${CONF}" > ${TARGET}/etc/syslog.conf
|
||||
install -m 644 ${TARGET}/usr/share/sysklogd/syslog.conf \
|
||||
${TARGET}/etc/syslog.conf
|
||||
fi
|
||||
if [ ! -f ${TARGET}/etc/default/sysklogd ]; then
|
||||
install -m 644 ${TARGET}/usr/share/sysklogd/sysklogd.default \
|
||||
${TARGET}/etc/default/sysklogd
|
||||
fi
|
||||
|
||||
if [[ ! ${TARGET} ]]; then
|
||||
/etc/init.d/sysklogd restart
|
||||
update-rc enable sysklogd
|
||||
else
|
||||
chroot ${TARGET} 'update-rc enable sysklogd'
|
||||
fi
|
||||
;;
|
||||
prerm)
|
||||
|
||||
Reference in New Issue
Block a user