#!/bin/sh
# syslogd — wrapper that ensures /var/adm/messages exists before launch.## syslogd opens its log targets (per /etc/syslog.conf) at startup; if any# named file doesn't exist, it logs an error and skips that target. On# Hammerhead the default conf points logs at /var/adm/messages, but the# bare BE we boot from has only rotated archives (messages.0, messages.1)# — not messages itself. Pre-create it so syslogd's startup is clean.set -e
[ -e /var/adm/messages ]||{ /usr/bin/touch /var/adm/messages
/bin/chmod 644 /var/adm/messages
/bin/chown root:root /var/adm/messages
}exec /usr/sbin/syslogd