Skip to content

Commit fd2b495

Browse files
committed
Use $USER instead of $(logname) to retrieve username on prerequisite.sh
1 parent 4c368a3 commit fd2b495

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

container/debian/cuttlefish-podcvd-prerequisites.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
set -e
1818

19+
username="$USER"
20+
: "${username:?username is empty}"
21+
1922
setup_device_availability() {
20-
local username=$(logname)
2123
# Execute both usermod and setfacl, to make podcvd working right after
2224
# executing this script and rebooting the machine.
2325
sudo usermod -aG kvm "$username"
@@ -27,7 +29,6 @@ setup_device_availability() {
2729
}
2830

2931
setup_rootless_podman() {
30-
local username=$(logname)
3132
if grep -q "^$username:" /etc/subuid /etc/subgid; then
3233
echo "Skip adding subuid/subgid. However, you may need to configure" \
3334
"it manually. Watch here for details." \

0 commit comments

Comments
 (0)