home · contact · privacy
Rename .aliases_etc.* to .profile.*
authorPlom Heller <plom@plomlompom.com>
Sun, 13 Sep 2026 03:11:10 +0000 (05:11 +0200)
committerPlom Heller <plom@plomlompom.com>
Sun, 13 Sep 2026 03:11:10 +0000 (05:11 +0200)
home/any/.aliases_etc.ls [deleted file]
home/any/.profile.aliases [new file with mode: 0644]
home/root/.aliases_etc.hibernation [deleted file]
home/root/.profile.hibernation [new file with mode: 0644]
home/user/.aliases_etc.hibernation [deleted file]
home/user/.profile.hibernation [new file with mode: 0644]
setup_scripts/lib/link_home.sh

diff --git a/home/any/.aliases_etc.ls b/home/any/.aliases_etc.ls
deleted file mode 100644 (file)
index f0ff635..0000000
+++ /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 (file)
index 0000000..f0ff635
--- /dev/null
@@ -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 (file)
index 8f1a3c5..0000000
+++ /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 (file)
index 0000000..8f1a3c5
--- /dev/null
@@ -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 (file)
index da7ef8f..0000000
+++ /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 (file)
index 0000000..da7ef8f
--- /dev/null
@@ -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 "$@"
+}
index c6f0ae0008d1710a642f00b46f8846bb3c7a37c2..e4037fd9f6897165055edab4a368c867db49bb31 100644 (file)
@@ -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}"
 }