From cb402a78db1b3f6a3a0e594ab89b92c8900ceed1 Mon Sep 17 00:00:00 2001 From: dschmenk Date: Tue, 27 Aug 2013 16:20:01 -0700 Subject: [PATCH] Auto update of Linux files for a2pid install Apple II now goes 80 column --- src/A2PI.PO | Bin 143360 -> 143360 bytes src/Makefile | 1 + src/install.sh | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100755 src/install.sh diff --git a/src/A2PI.PO b/src/A2PI.PO index aa63c61cb73927e0817ce84acf8e9b33d0677816..14f8a5a6a99581e863d4c14c1fc6df388be8cb52 100755 GIT binary patch delta 43 zcmZp8z|ru4V?zZiBj@Hy){Z~S3P1L3XJlgh!?=xwk%xuRvYnTMaXT*u(`R)6U6l>k delta 44 zcmZp8z|ru4V?zZiBirUm){Z}{D_MNL?%T}B^^0*E3nLE;qggvI2jg~L4yMoQ0C&R< As{jB1 diff --git a/src/Makefile b/src/Makefile index c18eaf4..8de244c 100755 --- a/src/Makefile +++ b/src/Makefile @@ -6,4 +6,5 @@ clean: rm $(BIN) *~ install: + $(BASH) ./install.sh cp $(BIN) /usr/local/bin diff --git a/src/install.sh b/src/install.sh new file mode 100755 index 0000000..5b6449b --- /dev/null +++ b/src/install.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# +# Update /boot partition files. +# +if [ ! -f /boot/cmdline.bak ] ; 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. +# +gettyline=`grep ttyAMA0 /etc/inittab` +if [ -n "$gettyline" -a ${gettyline:0:1} = T ] ; then + mv /etc/inittab /etc/inittab.bak + sed 's/^T0*/#T0*/' /etc/inittab.bak > /etc/inittab +fi +# +# Add a2serclk and a2pid to rc.local +# +if [ -f /etc/rc.local ] ; then + if ! grep a2pid /etc/rc.local > /dev/null ; then + mv /etc/rc.local /etc/rc.local.bak + sed -e '/^exit/i\# Start Apple II Pi' -e '/^exit/i\/usr/local/bin/a2serclk' -e '/^exit/i\/usr/local/bin/a2pid --daemon' /etc/rc.local.bak > /etc/rc.local + fi +fi \ No newline at end of file