From: Plom Heller Date: Sun, 13 Sep 2026 03:11:10 +0000 (+0200) Subject: Rename .aliases_etc.* to .profile.* X-Git-Url: https://plomlompom.com/repos/day?a=commitdiff_plain;h=ed3e65504bf7d7e6526ab02155ea8b544ac930eb;p=confplom Rename .aliases_etc.* to .profile.* --- diff --git a/home/any/.aliases_etc.ls b/home/any/.aliases_etc.ls deleted file mode 100644 index f0ff635..0000000 --- a/home/any/.aliases_etc.ls +++ /dev/null @@ -1,2 +0,0 @@ -alias ls="ls --color=auto" - diff --git a/home/any/.profile.aliases b/home/any/.profile.aliases new file mode 100644 index 0000000..f0ff635 --- /dev/null +++ b/home/any/.profile.aliases @@ -0,0 +1,2 @@ +alias ls="ls --color=auto" + diff --git a/home/root/.aliases_etc.hibernation b/home/root/.aliases_etc.hibernation deleted file mode 100644 index 8f1a3c5..0000000 --- a/home/root/.aliases_etc.hibernation +++ /dev/null @@ -1,8 +0,0 @@ -# /etc/systemd/system/sytemd-hibernate.service.d/60-poweroff-on-failure.conf -# is bypassed by pure "systemctl hibernate", so only allow wrap with poweroff -alias hibernate_safe="command systemctl hibernate || systemctl poweroff" -systemctl () { - local MSG="Use 'hibernate_safe' instead." - [ "$@" = "hibernate" ] && echo "${MSG}" && return 1 - command systemctl "$@" -} diff --git a/home/root/.profile.hibernation b/home/root/.profile.hibernation new file mode 100644 index 0000000..8f1a3c5 --- /dev/null +++ b/home/root/.profile.hibernation @@ -0,0 +1,8 @@ +# /etc/systemd/system/sytemd-hibernate.service.d/60-poweroff-on-failure.conf +# is bypassed by pure "systemctl hibernate", so only allow wrap with poweroff +alias hibernate_safe="command systemctl hibernate || systemctl poweroff" +systemctl () { + local MSG="Use 'hibernate_safe' instead." + [ "$@" = "hibernate" ] && echo "${MSG}" && return 1 + command systemctl "$@" +} diff --git a/home/user/.aliases_etc.hibernation b/home/user/.aliases_etc.hibernation deleted file mode 100644 index da7ef8f..0000000 --- a/home/user/.aliases_etc.hibernation +++ /dev/null @@ -1,6 +0,0 @@ -alias hibernate_safe="sudo /bin/sh -lc hibernate_safe" -sudo() { - local MSG="Use 'hibernate_safe' instead." - [ "$1 $2" = "systemctl hibernate" ] && echo "${MSG}" && return 1 - command sudo "$@" -} diff --git a/home/user/.profile.hibernation b/home/user/.profile.hibernation new file mode 100644 index 0000000..da7ef8f --- /dev/null +++ b/home/user/.profile.hibernation @@ -0,0 +1,6 @@ +alias hibernate_safe="sudo /bin/sh -lc hibernate_safe" +sudo() { + local MSG="Use 'hibernate_safe' instead." + [ "$1 $2" = "systemctl hibernate" ] && echo "${MSG}" && return 1 + command sudo "$@" +} diff --git a/setup_scripts/lib/link_home.sh b/setup_scripts/lib/link_home.sh index c6f0ae0..e4037fd 100644 --- a/setup_scripts/lib/link_home.sh +++ b/setup_scripts/lib/link_home.sh @@ -3,8 +3,7 @@ include PATH_REPO include msg link_home() { - local LOOP_ALIASFILES=\ -'for FILE in ${HOME}/.aliases_etc.*; do . "${FILE}"; done' + local LOOP_PROFILES='for FILE in ${HOME}/.profile.*; do . "${FILE}"; done' local PATH_PROFILE="${HOME}/${FNAME_PROFILE}" for DIRNAME in any "$1"; do local PATH_SKEL="${PATH_REPO}/home/${DIRNAME}" @@ -21,6 +20,6 @@ link_home() { done msg 'Augmenting user %s …' "${FNAME_PROFILE}" # test ensures idempotency - grep -qxF "${LOOP_ALIASFILES}" "${PATH_PROFILE}" 2>/dev/null\ - || printf '\n%s\n' "${LOOP_ALIASFILES}" >> "${PATH_PROFILE}" + grep -qxF "${LOOP_PROFILES}" "${PATH_PROFILE}" 2>/dev/null\ + || printf '\n%s\n' "${LOOP_PROFILES}" >> "${PATH_PROFILE}" }