Merge pull request #319 from femtofox/main

merge main to noon2
This commit is contained in:
noon92 2025-02-12 17:48:53 +02:00 • committed by GitHub
commit c51ffabb57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 24 additions and 24 deletions

View file

@ -107,7 +107,7 @@ networking_settings() {
wpa_supplicant_conf="/etc/wpa_supplicant/wpa_supplicant.conf"
choice="" # zero the choice before loading the submenu
while true; do
networking_choice=$(dialog --no-collapse --cancel-label "Back" --backtitle "IPv4 address: $(femto-network-config.sh -i)" --default-item "$networking_choice" --title "$title" --item-help --menu "" 16 40 4 \
networking_choice=$(dialog --no-collapse --cancel-label "Back" --backtitle "IPv4 address: $(femto-network-config.sh -i)" --default-item "$networking_choice" --title "$title" --item-help --menu "" 17 40 4 \
1 "Turn Wi-Fi on/off" "" \
2 "View Wi-Fi settings" "" \
3 "Change Wi-Fi settings" "" \
@ -800,4 +800,4 @@ while true; do
esac
done
exit 0
exit 0

View file

@ -91,7 +91,7 @@ package_menu() {
license_button=""
if $package_dir/$1.sh -O | grep -q 'G' && $package_dir/$1.sh -I; then license_button="--help-button --help-label License"; fi
# for each line, check if it's supported by the package, display it if the current install state of the package is appropriate (example: don't display "install" if the package is already installed, don't display "stop service" for a package with no services)
service_state=$(femto-utils.sh -C "$($package_dir/$1.sh -E)")
if $package_dir/$1.sh -I; then service_state=$(femto-utils.sh -C "$($package_dir/$1.sh -E)"); fi
menu_list="\
$(if $package_dir/$1.sh -O | grep -q 'l' && $package_dir/$1.sh -I; then echo "Run software x"; fi) \
$(if $package_dir/$1.sh -O | grep -q 'i' && ! $package_dir/$1.sh -I; then echo "Install x"; fi) \
@ -154,7 +154,7 @@ while true; do
index=1
for file in /usr/local/bin/packages/*.sh; do
filename=$(basename "$file" .sh)
[[ "$filename" == "package_template" ]] && continue # skip package_template.sh
[[ "$filename" == femto_* ]] && continue # skip filenames starting with femto_
case_block+="
\"$(/usr/local/bin/packages/"$filename".sh -N)\") package_intro \"$filename\" ;;"
((index++))

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interactive="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`

View file

@ -2,7 +2,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interaction="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`
@ -50,19 +50,19 @@ upgrade() {
# Check if already installed. `exit 0` if yes, `exit 1` if no
check() {
# the following works for cloned repos, but not for apt installs
if [ -d "$location" ]; then
exit 0
else
exit 1
fi
## the following works for cloned repos, but not for apt installs
# if [ -d "$location" ]; then
# exit 0
# else
# exit 1
# fi
# this works for apt packages
if dpkg-query -W -f='${Status}' $package_name 2>/dev/null | grep -q "install ok installed"; then
exit 0
else
exit 1
fi
## this works for apt packages
# if dpkg-query -W -f='${Status}' $package_name 2>/dev/null | grep -q "install ok installed"; then
# exit 0
# else
# exit 1
# fi
}
# display license - limit to 2000 chars

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interactive="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interaction="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interaction="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interaction="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interactive="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`

View file

@ -3,7 +3,7 @@
### For package maintainer:
# Fill the following fields and choose the options that are in use by this package
# Populate the install, uninstall and upgrade functions
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't really possible
# Remember that this script may be launched in terminal, via web UI or another method, so inputs aren't always possible
# This system supports both interactive and non-interactive installs. For non-interactive installs, $interaction="false". In this cause special instructions to the user should be given as user_message, such as `After installation, edit /opt/software/config.ini`
# Successful operations should `exit 0`, fails should `exit 1`
# Messages to the user (such as configuration instructions, explanatory error messages, etc) should be given as: `echo "user_message: text"`