Skip to content

Commit

Permalink
Update dev core patches
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklul committed Mar 1, 2025
1 parent 0655cc4 commit 25aa536
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
6 changes: 3 additions & 3 deletions patches/development/core-001-paths.patch
Original file line number Diff line number Diff line change
Expand Up @@ -522,12 +522,12 @@ index 4bb7d5e5..fcc988ad 100755
if [ -f "${versionsfile}" ]; then
# Only source versionsfile if the file exits
# fixes a warning during installation where versionsfile does not exist yet
@@ -113,7 +113,7 @@ reconfigurePiholeFunc() {
@@ -113,7 +113,7 @@ repairPiholeFunc() {
if [ -n "${DOCKER_VERSION}" ]; then
unsupportedFunc
else
- /etc/.pihole/automated\ install/basic-install.sh --reconfigure
+ /opt/share/pihole/basic-install.sh --reconfigure
- /etc/.pihole/automated\ install/basic-install.sh --repair
+ /opt/share/pihole/basic-install.sh --repair
exit 0;
fi
}
Expand Down
40 changes: 40 additions & 0 deletions patches/development/core-002-disable-unsupported.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/pihole b/pihole
index 7c84771..f4125a9 100755
--- a/pihole
+++ b/pihole
@@ -465,7 +469,12 @@ updateCheckFunc() {
}

unsupportedFunc(){
- echo "Function not supported in Docker images"
+ if [ -n "${DOCKER_VERSION}" ]; then
+ echo "Function not supported in Docker images"
+ elif [ -f /opt/etc/opkg.conf ]; then
+ echo "Function not supported in unofficial Entware package release"
+ fi
+
exit 0
}

@@ -578,17 +578,17 @@ case "${1}" in
"--allow-wild" | "allow-wild" ) listFunc "$@";;
"-d" | "debug" ) debugFunc "$@";;
"-f" | "flush" ) flushFunc "$@";;
- "-up" | "updatePihole" ) updatePiholeFunc "$@";;
- "-r" | "repair" ) repairPiholeFunc;;
+ "-up" | "updatePihole" ) unsupportedFunc;;
+ "-r" | "repair" ) unsupportedFunc;;
"-g" | "updateGravity" ) updateGravityFunc "$@";;
"-l" | "logging" ) piholeLogging "$@";;
- "uninstall" ) uninstallFunc;;
+ "uninstall" ) unsupportedFunc;;
"enable" ) piholeEnable true "$2";;
"disable" ) piholeEnable false "$2";;
"reloaddns" ) reloadDNS "reload";;
"reloadlists" ) reloadDNS "reload-lists";;
"setpassword" ) SetWebPassword "$@";;
- "checkout" ) piholeCheckoutFunc "$@";;
+ "checkout" ) unsupportedFunc;;
"updatechecker" ) shift; updateCheckFunc "$@";;
"arpflush" ) arpFunc "$@";;
"-t" | "tail" ) tailFunc "$2";;

0 comments on commit 25aa536

Please sign in to comment.