From cfc2a61de2fe3c68dbf997696b2d2e5703a75f17 Mon Sep 17 00:00:00 2001 From: Lars Date: Tue, 21 Jul 2020 18:41:41 +0200 Subject: [PATCH 1/8] Incremented development version --- setup/tx-pi-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index 4bbedf3..5f63b65 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -27,7 +27,7 @@ #=============================================================================== set -ue # Schema: YY..minor(.dev)? -TX_PI_VERSION='20.1.0' +TX_PI_VERSION='20.2.0-dev' DEBUG=false ENABLE_SPLASH=true From f7f03fd759fec44ed4e834d8e58906edda97bd67 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 3 Sep 2020 22:17:35 +0200 Subject: [PATCH 2/8] Added "Don't wait for network" to setup, changed version number to a minor release --- setup/tx-pi-setup.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index 5f63b65..439ffbf 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -27,7 +27,8 @@ #=============================================================================== set -ue # Schema: YY..minor(.dev)? -TX_PI_VERSION='20.2.0-dev' +# See for details +TX_PI_VERSION='20.1.1-dev' DEBUG=false ENABLE_SPLASH=true @@ -178,6 +179,10 @@ sed -i "s/#timeout 60;/timeout 10;/g" /etc/dhcp/dhclient.conf # Reduce this time to 20 sec. sed -i "s/#retry 60;/retry 20;/g" /etc/dhcp/dhclient.conf + +header "Disable wait for network" +raspi-config nonint do_boot_wait 1 + # ---------------------- display setup ---------------------- header "Install screen driver" @@ -229,6 +234,7 @@ EOF #-- Support for the TX-Pi HAT # Enable I2c +header "Enable I2C" raspi-config nonint do_i2c 0 dtparam=i2c_arm=on sed -i "s/dtparam=i2c_arm=on/dtparam=i2c_arm=on\ndtparam=i2c_vc=on/g" /boot/config.txt # Disable RTC From 562e3761d5486c1b37f96c2b81beb85f7b35f319 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 26 Dec 2020 01:32:46 +0100 Subject: [PATCH 3/8] Update of dist/README. More detailed instructions, not least for me. --- dist/README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dist/README.md b/dist/README.md index 235db10..08ed27f 100644 --- a/dist/README.md +++ b/dist/README.md @@ -9,13 +9,22 @@ to create an installable SD card image from a working TX-Pi setup. ``` # read image from SD card reader sudo cp /dev/sdb tx-pi-fullsize.img +# Download the pishrink script +wget https://raw.githubusercontent.com/harbaum/PiShrink/master/pishrink.sh +# Make the script executable +chmod +x pishrink.sh # shrink image sudo ./pishrink.sh -c tx-pi-fullsize.img tx-pi.img ``` Afterwards, you have to apply the [preparetxpidist.sh](https://github.com/ftCommunity/tx-pi/raw/master/dist/preparetxpidist.sh) script to the tx-pi.img: ``` -preparetxpidist.sh tx-pi.img +# Download the script +wget https://github.com/ftCommunity/tx-pi/raw/master/dist/preparetxpidist.sh +# Make the script executable +chmod +x preparetxpidist.sh +# Create the TX-Pi image +sudo ./preparetxpidist.sh tx-pi.img ``` This script modifies the image. Do not apply the script to the same image twice! From d8b7f4cceaca81fcb4affb6df7d4cd99d7d7c763 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 26 Dec 2020 18:08:22 +0100 Subject: [PATCH 4/8] Change hostname iff hostname is raspberrypi --- setup/tx-pi-setup.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index 439ffbf..b4c110c 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -115,6 +115,13 @@ else header "Setup for Waveshare 3.2 inch screen" fi +if [ $HOSTNAME == "raspberrypi" ]; then + msg "Found default hostname, change it to 'tx-pi'" + raspi-config nonint hostname tx-pi + rm -f /etc/ssh/ssh_host_* + ssh-keygen -A +fi + # Update Debian sources if [ "$IS_BUSTER" = true ]; then cat < /etc/apt/sources.list.d/tx-pi.list From a280aedef35cd05e2b9fec4f29130dca441eb8c8 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 26 Dec 2020 18:21:21 +0100 Subject: [PATCH 5/8] Invoke autoremove to uninstall obsolete packages --- setup/tx-pi-setup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index b4c110c..7949737 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -862,6 +862,9 @@ if [ ! -f "$shop_repositories" ]; then EOF fi +# Clean up if necessary +apt -y autoremove + msg "rebooting ..." sync From fef03f94069f7013a256ac415a0f21bc8cbd2050 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 26 Dec 2020 21:02:25 +0100 Subject: [PATCH 6/8] Better solution for changing the hostname --- setup/tx-pi-setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index 7949737..1bc2da2 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -115,9 +115,10 @@ else header "Setup for Waveshare 3.2 inch screen" fi -if [ $HOSTNAME == "raspberrypi" ]; then +if [ "$HOSTNAME" == "raspberrypi" ]; then msg "Found default hostname, change it to 'tx-pi'" - raspi-config nonint hostname tx-pi + sed -i "s/127.0.1.1.*${HOSTNAME}/127.0.1.1\ttx-pi/g" /etc/hosts + echo "tx-pi" > /etc/hostname rm -f /etc/ssh/ssh_host_* ssh-keygen -A fi From 5d221b24ab2259ac76c256c2240fd8ff3977be0c Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 26 Dec 2020 21:29:39 +0100 Subject: [PATCH 7/8] More elegant solution to change the hostname and the entry in /etc/hosts --- setup/tx-pi-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index 1bc2da2..437abbb 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -117,8 +117,7 @@ fi if [ "$HOSTNAME" == "raspberrypi" ]; then msg "Found default hostname, change it to 'tx-pi'" - sed -i "s/127.0.1.1.*${HOSTNAME}/127.0.1.1\ttx-pi/g" /etc/hosts - echo "tx-pi" > /etc/hostname + raspi-config nonint do_hostname tx-pi rm -f /etc/ssh/ssh_host_* ssh-keygen -A fi From bd5a2d58d451ffe75f35e434d0be562ac8076c55 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 26 Dec 2020 22:18:05 +0100 Subject: [PATCH 8/8] Incremented version number, updated CHANGES --- CHANGES.md | 4 ++++ setup/tx-pi-setup.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 65bb5cb..464054f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +## 20.1.1 -- 2020-12-26 +* Change hostname to "tx-pi" if the host uses the default hostname "raspberrypi" +* Remove obsolete packages automatically + ## 20.1.0 -- 2020-07-21 * Removed support for Debian Jessie (v8) * Added support for Debian Buster (v10) diff --git a/setup/tx-pi-setup.sh b/setup/tx-pi-setup.sh index 437abbb..c84be96 100644 --- a/setup/tx-pi-setup.sh +++ b/setup/tx-pi-setup.sh @@ -28,7 +28,7 @@ set -ue # Schema: YY..minor(.dev)? # See for details -TX_PI_VERSION='20.1.1-dev' +TX_PI_VERSION='20.1.1' DEBUG=false ENABLE_SPLASH=true