diff options
| author | Slack Coder <slackcoder@server.ky> | 2024-04-27 13:05:43 -0500 |
|---|---|---|
| committer | Slack Coder <slackcoder@server.ky> | 2024-04-27 13:05:43 -0500 |
| commit | e82682aef783dec0bc5383b146eae8e05185c6f1 (patch) | |
| tree | e27c46e30b40e67e5793eb2cd9988830e7dd3129 | |
| parent | 7840c58155ba898a4f325edabe7fa55259394875 (diff) | |
| download | efi-sync-e82682aef783dec0bc5383b146eae8e05185c6f1.tar.xz | |
Correct root check
Fix a bug where the username was not being sourced correctly. The
'USER' environment variable is not set in sysVinit scripts.
| -rw-r--r-- | efi-sync | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -43,7 +43,7 @@ require_efi () { } require_root () { - if [[ $USER != "root" ]]; then + if [[ "$(id --user --name)" != "root" ]]; then log "command must be run as root" exit 1 fi |
