Unable to do scripted upgrade since 5.11.3

What such pastes from console into code fences, for readability:

```
line 1
line 2
etc
```

That output suggests that the installer did honor PIHOLE_SKIP_OS_CHECK and indeed continued to run despite an unsupported OS being detected.

From what I'm able to grasp from your further output, it would seem that a tty dialog would prompt for a a selection of Exit or Continue interactively.
The corresponding code shows no involvement with PIHOLE_SKIP_OS_CHECK, but seems to evaluate user input:

Your log suggests that either you've opted to Exit or that the call to dialog failed and thus trigggered the default answer (again Exit)

Did you actually see the dialog from the code above during update?
If you've scripted answering that dialog, could you check your chosen answer?

When I logged into the machine through ssh and ran pihole -up it goes through the same logging, but when it gets to the point that errored out in the foreman run, I see a dialog box telling me I have an unsupported os, and to be sure I have lighttpd, lighttpd-fastcgi, and php >=7 installed and then a continue or quit button.

Okay, I see what is happening.

What automation are you using with Foreman, Ansible or Puppet? And what is the command that the run is using? You might want to use the unattended install flag if you're doing this headless.

I can change one or two of the dialogs to not fire if UNSUPPORTED is true but the dialog listing the required packages would still show.

Thanks for bringing this situation up, it's not one that I considered.

Edit: Or we add Rocky to the supported OS list.

"Edit: Or we add Rocky to the supported OS list." this would be the ideal solution. For the Foreman automation I am not using Puppet or Ansible for it. I am doing it as an SSH job. I've added "--unattended" to my commandline in Foreman and we'll see how that works when there is a new update available. I don't have any that currently need the upgrade applied.

1 Like

Would implement:

1 Like

Can someone get me the output from /etc/os-release on Rocky?

NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.6 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

1 Like

Can you please, try to add TERM=linux or TERM=xterm before the installation command to allow the dialog command recognize the terminal type?

Maybe TERM=screen.

1 Like

I can, but I'm not sure this would help as in this situation there really isn't a terminal. The whole point of this discussion is that the dialog shouldn't even try to show if the PIHOLE_SKIP_OS_CHECK environment variable is set. I already know that I'm on an unsupported os and accepted the risks.

I tried twice with the latest update. Adding "unatended" had no effect. Adding "Term=linux" allowed the dialog to show and then the update just hangs waiting for input on that dialog box. I guess I'll just have to manually apply updates until Rocky is a supported OS.

e[K [✓] Checking for ca-certificates
56:
57:e)0e[Je[He[K
58:e[K
59: ┌────────────────Unsupported RPM based distribution──────────────────┐e[K
60:│e[K
61:│e[K
62:│e[K
63:│e[K
64:│e[K
65:│e[K
66:│e[K
67:│e[K
68:│e[K
69:│e[K
70:│e[K
71:│e[K
72:│e[K
73:│e[K
74:│e[K
75:│e[K
76:────────────────────────────────────────────────────────────────────┤e[K
77:│Continue> < Exit >e[K
78:└────────────────────────────────────────────────────────────────────┘Would you like to continue installation on an unsupported RPM
79:e[8Gbased distribution?
80:
81:anually:
82:
83:e[8G- lighttpd
84:e[8G- lighttpd-fastcgi
85:

Okay, I'm going to go rogue and add Rocky.

Give the install a try now. I've tentatively added Rocky to the supported list.

I built a fresh Rocky Linux VM, and running:
curl -sSL https://install.pi-hole.net | bash
The first part of the script shows "Supported OS" but I still get the dialog:
PiHole Dialog (sorry, I can't put an image directly in the post.)

We are aware of this and one of the developers assigned himself to that issue.

This is different than the unsupported flag issue.

Rocky does pass the support txt record check but something else is triggering the PHP detection to fail.

Can you run curl -sSL https://install.pi-hole.net | sudo bash -x and get the output before that dialog comes up?

Does the same thing happen if you do the unattended flag?

Sorry, I'm getting: "Sorry, new users can't mention other users." trying to paste all of the output. I think this is the relative part of the dialog, looks like it needs to grep for Rocky also.
+ return 0

  • [[ dnf == \y\u\m ]]
  • [[ dnf == \d\n\f ]]
  • select_rpm_php
  • grep -qiE 'fedora|fedberry' /etc/redhat-release
  • grep -qiE 'centos|scientific' /etc/redhat-release
  • dialog --no-shadow --keep-tite --title 'Unsupported RPM based distribution' --defaultno --no-button Exit --yes-button Continue --yesno 'Would you like to continue installation on an unsupported RPM based distribution?\n\nPlease ensure the following packages have been installed manually:\n\n- lighttpd\n- lighttpd-fastcgi\n- PHP version 7+' 20 70
  • result=1
  • case ${result} in
  • printf ' %b User opted not to continue installation on an unsupported RPM based distribution.\n' '[i]'
    [i] User opted not to continue installation on an unsupported RPM based distribution.
  • exit 1

Yeah, I think that's the issue.

Can you show the contents of /etc/redhat-relelase?

editing line 384 in the install script to be:
elif grep -qiE 'centos|scientific|rocky' /etc/redhat-release; then
gets the install script past the dialog about an unsupported os.

2 Likes