| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
|
| 4 |
INITSCRIPTS="bootlogd stop-bootlogd-single stop-bootlogd" |
| 5 |
|
| 6 |
for F in $INITSCRIPTS; do |
| 7 |
if [ -x /etc/init.d/$F ]; then |
| 8 |
update-rc.d $F defaults >/dev/null || exit $? |
| 9 |
fi |
| 10 |
done |
| 11 |
|
| 12 |
mkdir -p /etc/systemd/system |
| 13 |
for F in $INITSCRIPTS; do |
| 14 |
SERVICE="$(basename $F .sh).service" |
| 15 |
if [ -x /etc/init.d/$F ] && [ ! -e /etc/systemd/system/$SERVICE ]; then |
| 16 |
ln -s /dev/null /etc/systemd/system/$SERVICE |
| 17 |
fi |
| 18 |
done |
| 19 |
|
| 20 |
# |
| 21 |
# Create initial log files |
| 22 |
# |
| 23 |
for F in /var/log/boot |
| 24 |
do |
| 25 |
if [ ! -f "$F" ] && touch "$F" >/dev/null 2>&1 |
| 26 |
then |
| 27 |
echo "(Nothing has been logged yet. If you're still seeing this message your current init system might not write bootup messages to the system console at all.)" >| "$F" |
| 28 |
chown root:adm "$F" |
| 29 |
chmod 640 "$F" |
| 30 |
fi |
| 31 |
done |
| 32 |
|
| 33 |
#DEBHELPER# |