From cd06269f9c9beb4860cd44a80662618e4f120073 Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Thu, 24 Feb 2022 22:23:58 -0600 Subject: [PATCH] Move openbox to x86 only --- .../standard/usr/bin/mynode_post_upgrade.sh | 20 ++++++++++++++++++- setup/setup_device.sh | 7 ++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/rootfs/standard/usr/bin/mynode_post_upgrade.sh b/rootfs/standard/usr/bin/mynode_post_upgrade.sh index 37ae57d8..e86c19ff 100755 --- a/rootfs/standard/usr/bin/mynode_post_upgrade.sh +++ b/rootfs/standard/usr/bin/mynode_post_upgrade.sh @@ -114,12 +114,17 @@ if ! skip_base_upgrades ; then $TORIFY apt-get -y install libatlas-base-dev libffi-dev libssl-dev glances python3-bottle $TORIFY apt-get -y -qq install apt-transport-https ca-certificates $TORIFY apt-get -y install libgmp-dev automake libtool libltdl-dev libltdl7 - $TORIFY apt-get -y install xorg chromium openbox lightdm openjdk-11-jre libevent-dev ncurses-dev + $TORIFY apt-get -y install openjdk-11-jre libevent-dev ncurses-dev $TORIFY apt-get -y install libudev-dev libusb-1.0-0-dev python3-venv gunicorn sqlite3 libsqlite3-dev $TORIFY apt-get -y install torsocks python3-requests libsystemd-dev libjpeg-dev zlib1g-dev psmisc $TORIFY apt-get -y install hexyl libbz2-dev liblzma-dev netcat-openbsd hdparm iotop nut obfs4proxy $TORIFY apt-get -y install libpq-dev socat + # Install Openbox GUI + if [ $IS_X86 = 1 ]; then + $TORIFY apt-get -y install xorg chromium openbox lightdm + fi + # Install device specific packages if [ $IS_X86 = 1 ]; then $TORIFY apt-get -y install cloud-init @@ -195,6 +200,19 @@ if ! skip_base_upgrades ; then echo "Python up to date" fi + # Add to python path + [ -d /usr/local/lib/python2.7/dist-packages ] && echo "/var/pynode" > /usr/local/lib/python2.7/dist-packages/pynode.pth + [ -d /usr/local/lib/python3.7/site-packages ] && echo "/var/pynode" > /usr/local/lib/python3.7/site-packages/pynode.pth + [ -d /usr/local/lib/python3.8/site-packages ] && echo "/var/pynode" > /usr/local/lib/python3.8/site-packages/pynode.pth + + # Remove old python files so new copies are used (files migrated to pynode) + PYNODE_FILES="/var/pynode/*.py" + for pynode_file in $PYNODE_FILES + do + pynode_file="$(basename -- $pynode_file)" + rm -f /var/www/mynode/$pynode_file* + done + # Install any pip3 software pip3 install --upgrade pip setuptools wheel || pip3 install --upgrade pip setuptools wheel --use-deprecated=html5lib diff --git a/setup/setup_device.sh b/setup/setup_device.sh index 82d75f6e..b7c56f5f 100755 --- a/setup/setup_device.sh +++ b/setup/setup_device.sh @@ -191,12 +191,17 @@ apt-get -y install pv sysstat network-manager rsync parted unzip pkg-config apt-get -y install libfreetype6-dev libpng-dev libatlas-base-dev libgmp-dev libltdl-dev apt-get -y install libffi-dev libssl-dev glances python3-bottle automake libtool libltdl7 apt -y -qq install apt-transport-https ca-certificates -apt-get -y install xorg chromium openbox lightdm openjdk-11-jre libevent-dev ncurses-dev +apt-get -y openjdk-11-jre libevent-dev ncurses-dev apt-get -y install zlib1g-dev libudev-dev libusb-1.0-0-dev python3-venv gunicorn apt-get -y install sqlite3 libsqlite3-dev torsocks python3-requests libsystemd-dev apt-get -y install libjpeg-dev zlib1g-dev psmisc hexyl libbz2-dev liblzma-dev netcat-openbsd apt-get -y install hdparm iotop nut obfs4proxy libpq-dev socat +# Install Openbox GUI +if [ $IS_X86 = 1 ]; then + apt-get -y install xorg chromium openbox lightdm +fi + # Install device specific packages if [ $IS_X86 = 1 ]; then apt-get -y install cloud-init