From 3930bcdd02dd842950b0afd3efbe28dd3e430196 Mon Sep 17 00:00:00 2001 From: "Scott C. MacCallum" Date: Sat, 16 Mar 2024 08:20:50 -0400 Subject: [PATCH] Many changes --- battery.ksh => battery-status.ksh | 2 +- config-gcc.ksh | 38 ++++++++++++++++++++++++++ config-apmd.ksh => config-power.ksh | 2 +- config-resources.ksh | 41 +++++++++++++++++++++++++++++ unmute-speaker.ksh | 37 ++++++++++++++++++++++++++ update-sys.ksh => update-system.ksh | 4 ++- 6 files changed, 121 insertions(+), 3 deletions(-) rename battery.ksh => battery-status.ksh (98%) create mode 100755 config-gcc.ksh rename config-apmd.ksh => config-power.ksh (98%) create mode 100755 config-resources.ksh create mode 100644 unmute-speaker.ksh rename update-sys.ksh => update-system.ksh (94%) diff --git a/battery.ksh b/battery-status.ksh similarity index 98% rename from battery.ksh rename to battery-status.ksh index fb1ceff..342b7a5 100755 --- a/battery.ksh +++ b/battery-status.ksh @@ -1,6 +1,6 @@ #!/bin/ksh -# battery.ksh +# battery-status.ksh # Display the batteries status. # Copyright (c) 2023, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. diff --git a/config-gcc.ksh b/config-gcc.ksh new file mode 100755 index 0000000..0269fca --- /dev/null +++ b/config-gcc.ksh @@ -0,0 +1,38 @@ +#!/bin/ksh + +# config-gcc.ksh +# This script creates a GCC symbolic link. Note, at this time this is +# unnecessary, as the package manager now handles this properly. +# 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. + +# Create a GCC symbolic link +ln -s /usr/local/bin/egcc /usr/bin/gcc + +echo -n "A symbolic link from /usr/local/bin/egcc to /usr/bin/gcc has been created." + +exit 0 diff --git a/config-apmd.ksh b/config-power.ksh similarity index 98% rename from config-apmd.ksh rename to config-power.ksh index 54325d5..f968a94 100755 --- a/config-apmd.ksh +++ b/config-power.ksh @@ -1,6 +1,6 @@ #!/bin/ksh -# config-apmd.ksh +# config-power.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). diff --git a/config-resources.ksh b/config-resources.ksh new file mode 100755 index 0000000..8dcb0a6 --- /dev/null +++ b/config-resources.ksh @@ -0,0 +1,41 @@ +#!/bin/ksh + +# config-resources.ksh +# This script configures system resources. +# 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. + +# Configure the maximum processes +echo "kern.maxproc=4096" >> /etc/sysctl.conf + +# Configure the maximum threads +echo "kern.maxthread=4096" >> /etc/sysctl.conf + +# Configure the maximum files +echo "kern.maxfiles=32768" >> /etc/sysctl.conf + +exit 0 diff --git a/unmute-speaker.ksh b/unmute-speaker.ksh new file mode 100644 index 0000000..bde76ac --- /dev/null +++ b/unmute-speaker.ksh @@ -0,0 +1,37 @@ +#!/bin/ksh + +# unmute-speak.ksh +# Unmute the speaker.ksh +# 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. + +# Unmute the speaker +echo "outputs.spkr_mute=off" >> /etc/mixerctl.conf + +# See if it's possible to put this into effect without a reboot + +exit 0 diff --git a/update-sys.ksh b/update-system.ksh similarity index 94% rename from update-sys.ksh rename to update-system.ksh index 2dd723d..b91ed1f 100755 --- a/update-sys.ksh +++ b/update-system.ksh @@ -1,6 +1,6 @@ #!/bin/ksh -# update-sys.sh +# update-system.sh # Update all packages, firmware, and system software. # Copyright (c) 2022, 2023, 2024, Scott C. MacCallum (scm@sdf.org). # All rights reserved. @@ -29,6 +29,8 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. +# Write code that separates each of these commands into options + # Update packages pkg_add -u