From dfb5fc31d87c43e69c5f9836117900a50bd1937a Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Tue, 6 Apr 2021 11:59:51 +0400 Subject: [PATCH] maj ulib/redhat --- lib/ulib/redhat | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/ulib/redhat b/lib/ulib/redhat index a398446..61496a3 100644 --- a/lib/ulib/redhat +++ b/lib/ulib/redhat @@ -91,3 +91,22 @@ function network_fix_hostname() { fi [ -n "$modified" ] } + +function network_fix_mailname() { + local host="$1" + local modified + [ -f /etc/mailname ] || touch /etc/mailname + if [ -n "$__REDHAT_NETWORK_DEVEL_SHOW_MODIFS" -o -n "$__NETWORK_DEVEL_SHOW_MODIFS" ]; then + uecho "Setting /etc/mailname to $host" + elif [ "$(/etc/mailname + modified=1 + fi + [ -n "$modified" ] +}