maj ulib/redhat
This commit is contained in:
parent
40c9cb968c
commit
dfb5fc31d8
|
@ -91,3 +91,22 @@ function network_fix_hostname() {
|
||||||
fi
|
fi
|
||||||
[ -n "$modified" ]
|
[ -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)" != "$host" ]; then
|
||||||
|
__network_backup /etc/mailname
|
||||||
|
if show_debug; then
|
||||||
|
edebug "Setting /etc/mailname to $host"
|
||||||
|
else
|
||||||
|
estep /etc/mailname
|
||||||
|
fi
|
||||||
|
echo "$host" >/etc/mailname
|
||||||
|
modified=1
|
||||||
|
fi
|
||||||
|
[ -n "$modified" ]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue