changed root check

This commit is contained in:
2024-03-04 19:34:30 -06:00
parent 833cdd74c3
commit e82c52baae
2 changed files with 6 additions and 8 deletions

View File

@@ -1,9 +1,8 @@
#!/bin/ash #!/bin/ash
if [ "$EUID" -ne 0 ] if ! [ $(id -u) = 0 ]; then
then echo "Please run as root!"
echo "Please run as root" exit 1
exit
fi fi
apk add --no-cache cfdisk e2fsprogs-extra apk add --no-cache cfdisk e2fsprogs-extra

View File

@@ -1,9 +1,8 @@
#!/bin/ash #!/bin/ash
if [ "$EUID" -ne 0 ] if ! [ $(id -u) = 0 ]; then
then echo "Please run as root!"
echo "Please run as root" exit 1
exit
fi fi
mkdir -p /home/akanealw/scripts > /dev/null 2>&1 mkdir -p /home/akanealw/scripts > /dev/null 2>&1