guix-install.sh: Replace ROOT_HOME with ~root

The `ROOT_HOME` variable is natively absent from some systems, however the form
`~root`, which is used by the install functions in this same file, works.

* etc/guix-install.sh (sys_delete_store, sys_delete_guix_daemon)
(sys_delete_user_profiles): Replace `ROOT_HOME` with `~root`.

Change-Id: Ia867e271ac4c5557d9708235fee028bccce68342
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
David Boilleau 2024-11-08 15:10:23 +01:00 committed by Ludovic Courtès
parent e02b3b0a66
commit 8edd081164
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -410,8 +410,8 @@ sys_delete_store()
_msg "${INF}removing /gnu" _msg "${INF}removing /gnu"
rm -rf /gnu rm -rf /gnu
_msg "${INF}removing ${ROOT_HOME}/.config/guix" _msg "${INF}removing ~root/.config/guix"
rm -rf ${ROOT_HOME}/.config/guix rm -rf ~root/.config/guix
} }
sys_create_build_user() sys_create_build_user()
@ -594,7 +594,7 @@ sys_delete_guix_daemon()
;; ;;
NA|*) NA|*)
_msg "${ERR}unsupported init system; disable, stop and remove the daemon manually:" _msg "${ERR}unsupported init system; disable, stop and remove the daemon manually:"
echo " ${ROOT_HOME}/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild" echo " ~root/.config/guix/current/bin/guix-daemon --build-users-group=guixbuild"
;; ;;
esac esac
@ -743,9 +743,9 @@ sys_delete_init_profile()
sys_delete_user_profiles() sys_delete_user_profiles()
{ {
_msg "${INF}removing ${ROOT_HOME}/.guix-profile" _msg "${INF}removing ~root/.guix-profile"
rm -f ${ROOT_HOME}/.guix-profile rm -f ~root/.guix-profile
rm -rf ${ROOT_HOME}/.cache/guix rm -rf ~root/.cache/guix
_msg "${INF}removing .guix-profile, .cache/guix and .config/guix of all /home users" _msg "${INF}removing .guix-profile, .cache/guix and .config/guix of all /home users"
for user in `ls -1 /home`; do for user in `ls -1 /home`; do