[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#40601] [PATCH 1/7] guix-install.sh: Remove "[[" bashisms in chk_ini
From: |
Vincent Legoll |
Subject: |
[bug#40601] [PATCH 1/7] guix-install.sh: Remove "[[" bashisms in chk_init_sys(). |
Date: |
Sun, 31 May 2020 22:42:51 +0200 |
* etc/guix-install.sh (chk_init_sys): Use `if something | grep' instead of "[["
pattern matching.
---
etc/guix-install.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index bf15aede21..455e021684 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -138,11 +138,11 @@ chk_term()
chk_init_sys()
{ # Return init system type name.
- if [[ $(/sbin/init --version 2>/dev/null) =~ upstart ]]; then
+ if /sbin/init --version 2>/dev/null | grep -q upstart; then
_msg "${INF}init system is: upstart"
INIT_SYS="upstart"
return 0
- elif [[ $(systemctl 2>/dev/null) =~ -\.mount ]]; then
+ elif systemctl 2>/dev/null | grep -q -- -\.mount; then
_msg "${INF}init system is: systemd"
INIT_SYS="systemd"
return 0
--
2.26.2
- [bug#40601] [PATCH 1/7] guix-install.sh: Remove "[[" bashisms in chk_init_sys().,
Vincent Legoll <=
- [bug#40601] [PATCH 3/7] guix-install.sh: Fix requirements., Vincent Legoll, 2020/05/31
- [bug#40601] [PATCH 4/7] guix-install.sh: trivial whitespace fix., Vincent Legoll, 2020/05/31
- [bug#40601] [PATCH 5/7] guix-install.sh: Add variable quoting in sys_make_guix_available., Vincent Legoll, 2020/05/31
- [bug#40601] [PATCH 6/7] guix-install.sh: Fix variable uses in guix_get_bin_list()., Vincent Legoll, 2020/05/31
- [bug#40601] [PATCH 7/7] guix-install.sh: Add missing variable quoting & curly-bracketing in guix_get_bin()., Vincent Legoll, 2020/05/31
- [bug#40601] [PATCH 2/7] guix-install.sh: Remove $UID bashism., Vincent Legoll, 2020/05/31