From 4175aa67c2b8f7f7eaadb9aee9ddc9d9f3e7cb0b Mon Sep 17 00:00:00 2001 From: "Scott C. MacCallum" Date: Wed, 13 Mar 2024 20:22:30 -0400 Subject: [PATCH] Many changes --- battery.ksh | 4 +- check-pkg.ksh | 4 +- config-admin.ksh | 39 ++++++++++++ enable-apmd.ksh => config-apmd.ksh | 12 ++-- doas-config.ksh => config-doas.ksh | 10 ++- install-gui-pkg.ksh | 19 +----- install-pkg.ksh | 97 +++++++++++++++--------------- run-sshd.ksh | 4 +- search-pkg.ksh | 4 +- volume-down.ksh | 4 +- volume-up.ksh | 4 +- 11 files changed, 109 insertions(+), 92 deletions(-) mode change 100644 => 100755 check-pkg.ksh create mode 100755 config-admin.ksh rename enable-apmd.ksh => config-apmd.ksh (79%) mode change 100644 => 100755 rename doas-config.ksh => config-doas.ksh (87%) mode change 100644 => 100755 run-sshd.ksh diff --git a/battery.ksh b/battery.ksh index a13849a..fb1ceff 100755 --- a/battery.ksh +++ b/battery.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # battery.ksh -# Display the batteries status -# Copyright (c) 2023, Scott C. MacCallum (scm@sdf.org) +# Display the batteries status. +# Copyright (c) 2023, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or diff --git a/check-pkg.ksh b/check-pkg.ksh old mode 100644 new mode 100755 index 9e8847f..7c3be63 --- a/check-pkg.ksh +++ b/check-pkg.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # check-pkg.ksh -# Check installed packages for any problems -# Copyright (c) 2023, Scott C. MacCallum (scm@sdf.org) +# Check installed packages for any problems. +# Copyright (c) 2023, 2024, Scott C. MacCallum (scm@sdf.org) # All rights reserved. # Redistribution and use of this software in source and binary forms, with or diff --git a/config-admin.ksh b/config-admin.ksh new file mode 100755 index 0000000..e9d3a91 --- /dev/null +++ b/config-admin.ksh @@ -0,0 +1,39 @@ +#!/bin/ksh + +# config-admin.ksh +# Add a admin user to the operator, staff, and wheel groups. +# Copyright (c) 2024, Scott C. MacCallum (scm@sdf.org). +# All rights reserved. + +# Redistribution and use of this software in source and binary forms, with or +# without modification, are permitted provided that the following conditions +# are met: + +# * Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. + +# * Neither the name of Scott C. MacCallum nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission of Scott C. +# MacCallum. + +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +echo -n "User to be added to the operator, staff, and wheel groups: " +read user + +usermod -G operator $user +usermod -G staff $user +usermod -G wheel $user + +exit 0 diff --git a/enable-apmd.ksh b/config-apmd.ksh old mode 100644 new mode 100755 similarity index 79% rename from enable-apmd.ksh rename to config-apmd.ksh index 96ca06d..54325d5 --- a/enable-apmd.ksh +++ b/config-apmd.ksh @@ -1,9 +1,9 @@ #!/bin/ksh -# enable-apmd.ksh -# Enable the Advanced Power Management daemon with settings that prevent -# the battery from running out before a proper shutdown -# Copyright (c) 2023, Scott C. MacCallum (scm@sdf.org) +# config-apmd.ksh +# Configure the Advanced Power Management daemon to put the computer in suspend +# mode when 15% of the battery is left. +# Copyright (c) 2023, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or @@ -30,10 +30,6 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# Enable the power manager and start it at boot. Have it adjust automatically -# to power needs. Put the computer in suspend mode when 15% of the battery is -# left. - rcctl enable apmd rcctl set apmd flags -A -z 15 rcctl start apmd diff --git a/doas-config.ksh b/config-doas.ksh similarity index 87% rename from doas-config.ksh rename to config-doas.ksh index 30e6fc7..b03078d 100755 --- a/doas-config.ksh +++ b/config-doas.ksh @@ -1,7 +1,8 @@ #!/bin/ksh -# doas-config.ksh -# Copyright (c) 2022, Scott C. MacCallum (scm@sdf.org) +# config-doas.ksh +# Configure doas so that users in the wheel group can run it. +# Copyright (c) 2022, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or @@ -28,10 +29,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# Enable the doas ability for those that are in the wheel group - echo "permit :wheel" >> /etc/doas.conf - -echo "Those that are in the wheel group now have doas ability." +echo "Users that are in the wheel group can now run doas." exit 0 diff --git a/install-gui-pkg.ksh b/install-gui-pkg.ksh index 01f2b1b..b410676 100755 --- a/install-gui-pkg.ksh +++ b/install-gui-pkg.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # install-gui-pkg.ksh -# Install graphical user interface packages -# Copyright (c) 2023, Scott C. MacCallum (scm@sdf.org) +# Install graphical user interface packages. +# Copyright (c) 2023, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or @@ -29,20 +29,6 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# Install the following GUI packages - -<<<<<<< Updated upstream:install-gui-pkg.ksh -#pkg_add audacity -#pkg_add blender -#pkg_add chromium -#pkg_add filezilla -#pkg_add firefox -#pkg_add gimp -#pkg_add libreoffice -#pkg_add thunderbird -#pkg_add vlc -#pkg_add wireshark -======= pkg_add audacity pkg_add blender pkg_add chromium @@ -53,6 +39,5 @@ pkg_add libreoffice pkg_add thunderbird pkg_add vlc pkg_add wireshark ->>>>>>> Stashed changes:install-gui-pkg.sh exit 0 diff --git a/install-pkg.ksh b/install-pkg.ksh index c83161d..af31144 100755 --- a/install-pkg.ksh +++ b/install-pkg.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # install-pkg.sh -# Install shell packages -# Copyright (c) 2022, 2023, Scott C. MacCallum (scm@sdf.org) +# Install text-based packages. +# Copyright (c) 2022, 2023, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or @@ -29,53 +29,50 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -# Install the following shell packages - -# pkg_add alpine -# pkg_add amfora -# pkg_add autoconf -# pkg_add bash -# pkg_add clisp -# pkg_add clojure -# pkg_add cmake -# pkg_add dos2unix -# pkg_add dosbox -# pkg_add emacs -# pkg_add gbg -# pkg_add gcc -# pkg_add gforth -# pkg_add git -# pkg_add gmake -# pkg_add gnupg -# pkg_add go -# pkg_add gopher -# pkg_add gprolog -# pkg_add gtar -# pkg_add guile -# pkg_add html2text -# pkg_add jdk -# pkg_add links -# pkg_add mosh -# pkg_add mpg123 -# pkg_add nano -# pkg_add nasm -# pkg_add nmap -# pkg_add node -# pkg_add ntfs_3g -# pkg_add openconnect -# pkg_add python -# pkg_add rsync -# pkg_add ruby -# pkg_add rust -# pkg_add sbcl -# pkg_add screen -# pkg_add subversion -# pkg_add swi-prolog -# pkg_add texinfo -# pkg_add unzip -# pkg_add w3m -# pkg_add wget -# pkg_add xa -# pkg_add xz +pkg_add alpine +pkg_add amfora +pkg_add autoconf +pkg_add bash +pkg_add clisp +pkg_add clojure +pkg_add cmake +pkg_add dos2unix +pkg_add emacs +pkg_add gbg +pkg_add gcc +pkg_add gforth +pkg_add git +pkg_add gmake +pkg_add gnupg +pkg_add go +pkg_add gopher +pkg_add gprolog +pkg_add gtar +pkg_add guile +pkg_add html2text +pkg_add jdk +pkg_add links +pkg_add mosh +pkg_add mpg123 +pkg_add nano +pkg_add nasm +pkg_add nmap +pkg_add node +pkg_add ntfs_3g +pkg_add openconnect +pkg_add python +pkg_add rsync +pkg_add ruby +pkg_add rust +pkg_add sbcl +pkg_add screen +pkg_add subversion +pkg_add swi-prolog +pkg_add texinfo +pkg_add unzip +pkg_add w3m +pkg_add wget +pkg_add xa +pkg_add xz exit 0 diff --git a/run-sshd.ksh b/run-sshd.ksh old mode 100644 new mode 100755 index 4d7b552..99d74e0 --- a/run-sshd.ksh +++ b/run-sshd.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # run-sshd.ksh -# Start the Secure Shell daemon -# Copyright (c) 2022, 2023, Scott C. MacCallum (scm@sdf.org) +# Start the Secure Shell daemon. +# Copyright (c) 2022, 2023, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or diff --git a/search-pkg.ksh b/search-pkg.ksh index 1e9c0bf..eb215ed 100755 --- a/search-pkg.ksh +++ b/search-pkg.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # search-pkg.ksh -# Search for package -# Copyright (c) 2022, 2023, Scott C. MacCallum (scm@sdf.org) +# Search for a package. +# Copyright (c) 2022, 2023, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or diff --git a/volume-down.ksh b/volume-down.ksh index 58c6502..d8d683b 100755 --- a/volume-down.ksh +++ b/volume-down.ksh @@ -1,8 +1,8 @@ #!/bin/ksh # volume-down.ksh -# Soundcard volume up adjusting -# Copyright (c) 2022, Scott C. MacCallum (scm@sdf.org) +# Adjust the sound volume down. +# Copyright (c) 2022, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or diff --git a/volume-up.ksh b/volume-up.ksh index 98c8f5b..4fa8572 100755 --- a/volume-up.ksh +++ b/volume-up.ksh @@ -1,6 +1,8 @@ #!/bin/ksh -# Copyright (c) 2022, Scott C. MacCallum (scm@sdf.org) +# volume-up.ksh +# Adjust the sound volume up. +# Copyright (c) 2022, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. # Redistribution and use of this software in source and binary forms, with or