mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
readd root for running the script
Signed-off-by: Tobias Powalowski <tpowa@archlinux.org>
This commit is contained in:
parent
a1e1fd89ce
commit
54f0a0454d
1 changed files with 6 additions and 0 deletions
|
@ -50,6 +50,12 @@ while [ $# -gt 0 ]; do
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
|
### check for root
|
||||||
|
if ! [[ ${UID} -eq 0 ]]; then
|
||||||
|
echo "ERROR: Please run as root user!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# set defaults, if nothing given
|
# set defaults, if nothing given
|
||||||
[[ -z "${RELEASENAME}" ]] && RELEASENAME="$(date +%Y%m%d-%H%M)"
|
[[ -z "${RELEASENAME}" ]] && RELEASENAME="$(date +%Y%m%d-%H%M)"
|
||||||
[[ -z "${IMAGENAME}" ]] && IMAGENAME="archlinux-${RELEASENAME}-archboot"
|
[[ -z "${IMAGENAME}" ]] && IMAGENAME="archlinux-${RELEASENAME}-archboot"
|
||||||
|
|
Loading…
Reference in a new issue