mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-02-16 21:40:45 +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
|
if hash lsb_release 2> /dev/null; then
|
||||||
(
|
(
|
||||||
export LC_ALL="en_DK.UTF-8"
|
export LC_ALL="en_DK.UTF-8"
|
||||||
|
if hash hostname 2> /dev/null; then
|
||||||
hostname --all-fqdns &
|
hostname --all-fqdns &
|
||||||
hostname --all-ip-addresses
|
hostname --all-ip-addresses &
|
||||||
|
elif hash hostnamectl 2> /dev/null; then
|
||||||
|
hostnamectl hostname &
|
||||||
|
fi
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
printf "$(uptime --pretty)\t$(uptime)\n"
|
||||||
printf "\nPresent:\n"
|
printf "\nPresent:\n"
|
||||||
@ -254,9 +258,6 @@ fi
|
|||||||
#export CLICOLOR=1
|
#export CLICOLOR=1
|
||||||
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||||||
|
|
||||||
# znc uses this variable for figuring out hostname
|
|
||||||
#export HOSTNAME=$(hostname --fqdn)
|
|
||||||
|
|
||||||
# Ensure not leaking queries to upstream nameservers (resolv.conf)
|
# Ensure not leaking queries to upstream nameservers (resolv.conf)
|
||||||
export LOCALDOMAIN=.
|
export LOCALDOMAIN=.
|
||||||
# Secureish resolv.conf options (except trust-ad, but systemd also sets it
|
# 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
|
if hash lsb_release 2> /dev/null; then
|
||||||
(
|
(
|
||||||
export LC_ALL="en_DK.UTF-8"
|
export LC_ALL="en_DK.UTF-8"
|
||||||
|
if hash hostname 2> /dev/null; then
|
||||||
hostname --all-fqdns &
|
hostname --all-fqdns &
|
||||||
hostname --all-ip-addresses
|
hostname --all-ip-addresses &
|
||||||
|
elif hash hostnamectl 2> /dev/null; then
|
||||||
|
hostnamectl hostname &
|
||||||
|
fi
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "$(uptime --pretty)\t$(uptime)\n"
|
printf "$(uptime --pretty)\t$(uptime)\n"
|
||||||
printf "\nPresent:\n"
|
printf "\nPresent:\n"
|
||||||
@ -215,9 +219,6 @@ fi
|
|||||||
#export CLICOLOR=1
|
#export CLICOLOR=1
|
||||||
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
#export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
|
||||||
|
|
||||||
# znc uses this variable for figuring out hostname
|
|
||||||
#export HOSTNAME=$(hostname --fqdn)
|
|
||||||
|
|
||||||
# Ensure not leaking queries to upstream nameservers (resolv.conf)
|
# Ensure not leaking queries to upstream nameservers (resolv.conf)
|
||||||
export LOCALDOMAIN=.
|
export LOCALDOMAIN=.
|
||||||
# Secureish resolv.conf options (except trust-ad, but systemd also sets it
|
# Secureish resolv.conf options (except trust-ad, but systemd also sets it
|
||||||
|
Loading…
x
Reference in New Issue
Block a user