mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-22 11:19:22 +01:00
{bash,zsh}rc: check for existence of hostname{,ctl} as apparently Arch Linux doesn't ship it
This commit is contained in:
parent
fab94cc0a0
commit
98976e793d
@ -134,8 +134,12 @@ fi
|
||||
if hash lsb_release 2> /dev/null; then
|
||||
(
|
||||
export LC_ALL="en_DK.UTF-8"
|
||||
if hash hostname 2> /dev/null; then
|
||||
hostname --all-fqdns &
|
||||
hostname --all-ip-addresses
|
||||
hostname --all-ip-addresses &
|
||||
elif hash hostnamectl 2> /dev/null; then
|
||||
hostnamectl hostname &
|
||||
fi
|
||||
printf "\n"
|
||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
||||
printf "\nPresent:\n"
|
||||
@ -254,9 +258,6 @@ fi
|
||||
#export CLICOLOR=1
|
||||
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||||
|
||||
# znc uses this variable for figuring out hostname
|
||||
#export HOSTNAME=$(hostname --fqdn)
|
||||
|
||||
# Ensure not leaking queries to upstream nameservers (resolv.conf)
|
||||
export LOCALDOMAIN=.
|
||||
# Secureish resolv.conf options (except trust-ad, but systemd also sets it
|
||||
|
9
rc/zshrc
9
rc/zshrc
@ -31,8 +31,12 @@ fi
|
||||
if hash lsb_release 2> /dev/null; then
|
||||
(
|
||||
export LC_ALL="en_DK.UTF-8"
|
||||
if hash hostname 2> /dev/null; then
|
||||
hostname --all-fqdns &
|
||||
hostname --all-ip-addresses
|
||||
hostname --all-ip-addresses &
|
||||
elif hash hostnamectl 2> /dev/null; then
|
||||
hostnamectl hostname &
|
||||
fi
|
||||
printf "\n"
|
||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
||||
printf "\nPresent:\n"
|
||||
@ -215,9 +219,6 @@ fi
|
||||
#export CLICOLOR=1
|
||||
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||||
|
||||
# znc uses this variable for figuring out hostname
|
||||
#export HOSTNAME=$(hostname --fqdn)
|
||||
|
||||
# Ensure not leaking queries to upstream nameservers (resolv.conf)
|
||||
export LOCALDOMAIN=.
|
||||
# Secureish resolv.conf options (except trust-ad, but systemd also sets it
|
||||
|
Loading…
Reference in New Issue
Block a user