#!/bin/sh -e case "$1" in configure) # place the templates in /etc if they're not there ... for file in mgetty.config dialin.config login.config; do if [ ! -f /etc/mgetty/$file ] ; then cp -a /usr/share/mgetty/templates/etc/$file /etc/mgetty/$file; fi; done # Remove old style of crontab insertion if present if grep -qs '^#-- mgetty begin$' /etc/crontab then TMP=/etc/crontab.tmp awk 'BEGIN {found=0} /^#-- mgetty begin$/ {found = 1} /^#-- mgetty end$/ {found = -1} {if (!found) print} {if (found == -1) found=0} END {if (found) exit 1}' /etc/crontab >$TMP && if [ -s $TMP ] then mv -f $TMP /etc/crontab fi fi if [ -f /etc/cron.daily/mgetty ]; then rm -f /etc/cron.daily/mgetty fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) ;; esac chmod 0600 /etc/mgetty/login.config exit 0;