[GH-ISSUE #4570] [Bug]: Red Hat 9 dependency check - mailx #2844

Closed
opened 2026-02-27 03:05:45 +03:00 by kerem · 3 comments
Owner

Originally created by @danatinflux on GitHub (May 5, 2024).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4570

User story

Red Hat 9 no longer installs mailx. However, whenever I start Rust, it checks for it and tries to install it. This is making it more difficult to run commands in crontab, as it always asks for the sudo password when restarting or checking for updates.

Game

Rust

Linux distro

RedHat 9

Command

command: backup

Further information

When using the 'rustserver' command, it always checks for the mailx package, which is no longer installed on RH9.

 [rustserver@REDACT~]$ /home/rustserver/rustserver backup
[ WARN ] Backing up rustserver: Missing dependencies: mailx[sudo] password for rustserver:
Information! Automatically installing missing dependencies.
Updating Subscription Management repositories.
Last metadata expiration check: 0:46:28 ago on Sun 05 May 2024 08:14:36 AM PDT.
No match for argument: mailx
Error: Unable to find a match: mailx 

This makes it a challenge to use the 'rustserver' command for crontab commands like backup, update, et. al.

Relevant log output

No response

Steps to reproduce

  1. Use the 'rustserver' command to attempt a backup.
  2. The dependency will fail and the user will be asked for the sudo password to install the dependency (which it cannot).
Originally created by @danatinflux on GitHub (May 5, 2024). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/4570 ### User story Red Hat 9 no longer [installs mailx](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/considerations_in_adopting_rhel_9/assembly_changes-to-packages_considerations-in-adopting-rhel-9). However, whenever I start Rust, it checks for it and tries to install it. This is making it more difficult to run commands in crontab, as it always asks for the sudo password when restarting or checking for updates. ### Game Rust ### Linux distro RedHat 9 ### Command command: backup ### Further information When using the 'rustserver' command, it always checks for the mailx package, which is no longer installed on RH9. ``` [rustserver@REDACT~]$ /home/rustserver/rustserver backup [ WARN ] Backing up rustserver: Missing dependencies: mailx[sudo] password for rustserver: Information! Automatically installing missing dependencies. Updating Subscription Management repositories. Last metadata expiration check: 0:46:28 ago on Sun 05 May 2024 08:14:36 AM PDT. No match for argument: mailx Error: Unable to find a match: mailx ``` This makes it a challenge to use the 'rustserver' command for crontab commands like backup, update, et. al. ### Relevant log output _No response_ ### Steps to reproduce 1) Use the 'rustserver' command to attempt a backup. 2) The dependency will fail and the user will be asked for the sudo password to install the dependency (which it cannot).
Author
Owner

@dgibbs64 commented on GitHub (May 5, 2024):

Probably this line causing the issue github.com/MicLieg/LinuxGSM@b3e40a59e9/lgsm/modules/check_deps.sh (L116-L117)

This will need to be updated to reflect changes in dependency names. I belive the replacement is s-nail

<!-- gh-comment-id:2094946498 --> @dgibbs64 commented on GitHub (May 5, 2024): Probably this line causing the issue https://github.com/MicLieg/LinuxGSM/blob/b3e40a59e994df6ea42d781a938522affc785b75/lgsm/modules/check_deps.sh#L116-L117 This will need to be updated to reflect changes in dependency names. I belive the replacement is s-nail
Author
Owner

@danatinflux commented on GitHub (May 6, 2024):

Fantastic! Thanks so much----I hadn't thought of grepping the 'modules' dir.

Changes made:

fn_deps_email() {
        # Adds postfix to required dependencies if email alert is enabled.
        if [ "${emailalert}" == "on" ]; then
                if [ -f /usr/bin/mailx ]; then
                        if [ -d /etc/exim4 ]; then
                                array_deps_required+=(exim4)
                        elif [ -d /etc/sendmail ]; then
                                array_deps_required+=(sendmail)
                        elif [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then
                                array_deps_required+=(s-nail postfix)
                        elif [ "$(command -v apt 2> /dev/null)" ]; then
                                array_deps_required+=(mailutils postfix)
                        fi
                else
                        if [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then
                                array_deps_required+=(s-nail postfix)
                        elif [ "$(command -v apt 2> /dev/null)" ]; then
                                array_deps_required+=(mailutils postfix)
                        fi
                fi
        fi
}

Seems to be working perfectly, thanks!

<!-- gh-comment-id:2096182417 --> @danatinflux commented on GitHub (May 6, 2024): Fantastic! Thanks so much----I hadn't thought of grepping the 'modules' dir. Changes made: ``` fn_deps_email() { # Adds postfix to required dependencies if email alert is enabled. if [ "${emailalert}" == "on" ]; then if [ -f /usr/bin/mailx ]; then if [ -d /etc/exim4 ]; then array_deps_required+=(exim4) elif [ -d /etc/sendmail ]; then array_deps_required+=(sendmail) elif [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then array_deps_required+=(s-nail postfix) elif [ "$(command -v apt 2> /dev/null)" ]; then array_deps_required+=(mailutils postfix) fi else if [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then array_deps_required+=(s-nail postfix) elif [ "$(command -v apt 2> /dev/null)" ]; then array_deps_required+=(mailutils postfix) fi fi fi } ``` Seems to be working perfectly, thanks!
Author
Owner

@dgibbs64 commented on GitHub (Jan 5, 2025):

b10820fd42

<!-- gh-comment-id:2571695034 --> @dgibbs64 commented on GitHub (Jan 5, 2025): b10820fd4258721f6b6473ce37a69991cb5ad2a9
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#2844
No description provided.