updated the installer so that it should actually work
Some checks failed
Build / build (push) Failing after 5m23s
Some checks failed
Build / build (push) Failing after 5m23s
This commit is contained in:
22
examples/os-installer-config-arkdep/scripts/prepare.sh
Normal file
22
examples/os-installer-config-arkdep/scripts/prepare.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
## Generic checks
|
||||
#
|
||||
# Ensure user is in sudo group
|
||||
for group in $(groups); do
|
||||
|
||||
if [[ $group == 'wheel' || $group == 'sudo' ]]; then
|
||||
declare -ri sudo_ok=1
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
# If user is not in sudo group notify and exit with error
|
||||
if [[ ! -n $sudo_ok ]]; then
|
||||
printf 'The current user is not a member of either the sudo or wheel group, this os-installer configuration requires sudo permissions\n'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user