mirror of
https://github.com/dschmenk/apple2pi.git
synced 2024-12-22 17:29:33 +00:00
66 lines
1.7 KiB
Bash
66 lines
1.7 KiB
Bash
#!/bin/sh
|
|
# postinst script for a2pi
|
|
#
|
|
# see: dh_installdeb(1)
|
|
|
|
set -e
|
|
|
|
# summary of how this script can be called:
|
|
# * <postinst> `configure' <most-recently-configured-version>
|
|
# * <old-postinst> `abort-upgrade' <new version>
|
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
|
# <new-version>
|
|
# * <postinst> `abort-remove'
|
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
|
# <failed-install-package> <version> `removing'
|
|
# <conflicting-package> <version>
|
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
|
# the debian-policy package
|
|
|
|
|
|
case "$1" in
|
|
configure)
|
|
#
|
|
# Update /boot partition files.
|
|
#
|
|
ttyline=`grep ttyAMA0 /boot/cmdline.txt`
|
|
if [ "$ttyline" != "" ] ; then
|
|
mv /boot/cmdline.txt /boot/cmdline.bak
|
|
echo "dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait" > /boot/cmdline.txt
|
|
fi
|
|
#
|
|
# Disable getty on built-in serial port.
|
|
#
|
|
ttyline=`grep ttyAMA0 /etc/inittab`
|
|
case "$gettyline" in
|
|
T*)
|
|
mv /etc/inittab /etc/inittab.bak
|
|
sed 's/^T0*/#T0*/' /etc/inittab.bak > /etc/inittab
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
#
|
|
# Disable joystick as a mouse in X
|
|
#
|
|
if [ -d /usr/share/X11/xorg.conf.d ] ; then
|
|
cp /usr/share/a2pi/11-joy.conf /usr/share/X11/xorg.conf.d
|
|
fi
|
|
;;
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
;;
|
|
|
|
*)
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# dh_installdeb will replace this with shell code automatically
|
|
# generated by other debhelper scripts.
|
|
|
|
#DEBHELPER#
|
|
|
|
exit 0
|