Incorporated changes for release 1.3.4
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
source common.sh
|
||||
current_user=`whoami`
|
||||
current_login=`who am i | awk '{print $1}'`
|
||||
if [ "$current_user" != "root" ]
|
||||
@@ -53,7 +54,31 @@ echo "If you have completed these steps, press enter to continue. If not,"
|
||||
echo -n "press ctrl-c to quit."
|
||||
read continueok
|
||||
echo ""
|
||||
getmodel
|
||||
echo ""
|
||||
getosrelease
|
||||
echo ""
|
||||
getarch
|
||||
echo ""
|
||||
if [ $arch_32_64 -eq 64 -a "$ismodel3" = "true" ]
|
||||
then
|
||||
echo "Raspberry Pi 3 hardware is known to have problems with acting as a"
|
||||
echo "wireless access point when 64 bit kernels are used. If you intend for"
|
||||
echo "this terminal to act as a wireless access point, you should stop here,"
|
||||
echo "power off, remove the microsd card and re-image using a 32 bit version"
|
||||
echo "of Raspberry Pi OS."
|
||||
echo -n "Ignore and [c]ontinue or [A]bort? [c/A]: "
|
||||
read archabort
|
||||
if [ "$archabort" = "C" -o "$archabort" = "c" ]
|
||||
then
|
||||
echo ""
|
||||
echo "Continuing with installation."
|
||||
else
|
||||
echo ""
|
||||
echo "Aborting installation."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Updating Raspberry Pi OS..."
|
||||
@@ -70,13 +95,12 @@ echo ""
|
||||
echo "...done."
|
||||
sleep 10
|
||||
echo ""
|
||||
echo ""
|
||||
echo "Copying files..."
|
||||
chmod +x usr/local/bin/*
|
||||
cp usr/local/bin/* /usr/local/bin
|
||||
cp etc/drs.conf /etc
|
||||
cp etc/apt/sources.list.d/* /etc/apt/sources.list.d
|
||||
cp lib/systemd/system/getty@tty1.service /lib/systemd/system
|
||||
chmod +x $os_rel_ver/usr/local/bin/*
|
||||
cp -v $os_rel_ver/usr/local/bin/* /usr/local/bin
|
||||
cp -v $os_rel_ver/etc/drs.conf /etc
|
||||
cp -v $os_rel_ver/etc/apt/sources.list.d/* /etc/apt/sources.list.d
|
||||
cp -v $os_rel_ver/lib/systemd/system/getty@tty1.service /lib/systemd/system
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
@@ -91,25 +115,47 @@ echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo ""
|
||||
echo "deb https://download.webmin.com/download/repository sarge contrib" >/etc/apt/sources.list.d/webmin.list
|
||||
wget https://download.webmin.com/jcameron-key.asc
|
||||
cat jcameron-key.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/jcameron-key.gpg
|
||||
rm jcameron-key.asc
|
||||
apt install apt-transport-https
|
||||
apt update
|
||||
skipwebmin="false"
|
||||
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Warning: failed to download Webmin repo setup script."
|
||||
echo -n "Ignore and [c]ontinue or [A]bort? [c/A]: "
|
||||
read wmfailchoice
|
||||
if [ "$wmfailchoice" = "C" -o "$wmfailchoice" = "c" ]
|
||||
then
|
||||
skipwebmin="true"
|
||||
echo "Continuing without installing Webmin. You should investigate the failure"
|
||||
echo "and install Webmin manually after the terminal is set up, as the"
|
||||
echo "Manage Terminal link in the OpenDRS menu depends on it."
|
||||
echo -n "Press enter to continue."
|
||||
read continueok
|
||||
echo ""
|
||||
apt update
|
||||
else
|
||||
echo "Aborting terminal setup."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
if [ "$skipwebmin" = "false" ]
|
||||
then
|
||||
sh setup-repos.sh -f
|
||||
apt update
|
||||
apt install -y --install-recommends webmin
|
||||
fi
|
||||
apt install -y --no-install-recommends xorg openbox chromium-browser
|
||||
apt install -y cups libcups2-dev cmake
|
||||
apt install -y webmin
|
||||
addgroup lpadmin
|
||||
usermod -a -G lpadmin $current_login
|
||||
systemctl enable getty@tty1.service
|
||||
service cups-browsed stop
|
||||
systemctl disable cups-browsed.service
|
||||
cp etc/cups/cupsd.conf /etc/cups/
|
||||
cp $os_rel_ver/etc/cups/cupsd.conf /etc/cups/
|
||||
service cups restart
|
||||
cd brlaser-master
|
||||
cd $os_rel_ver/brlaser-master
|
||||
cmake . && make && make install
|
||||
cd ..
|
||||
cd ../..
|
||||
myhn=`hostname`
|
||||
echo ""
|
||||
echo ""
|
||||
@@ -131,8 +177,8 @@ echo ""
|
||||
echo ""
|
||||
cloneuser $current_login customer
|
||||
mkdir -p /home/customer/.config/openbox
|
||||
cp home/customer/.profile /home/customer
|
||||
cp home/customer/.config/openbox/rc.xml /home/customer/.config/openbox
|
||||
cp $os_rel_ver/home/customer/.profile /home/customer
|
||||
cp $os_rel_ver/home/customer/.config/openbox/rc.xml /home/customer/.config/openbox
|
||||
chown -R customer:customer /home/customer/.config /home/customer/.profile
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user