mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 03:20:38 +02:00
use _root_check
This commit is contained in:
parent
8ce119af52
commit
0e47c265fc
2 changed files with 3 additions and 11 deletions
|
@ -16,11 +16,7 @@ _usage()
|
|||
}
|
||||
##################################################
|
||||
[[ -z "${1}" ]] && _usage
|
||||
### check for root
|
||||
if ! [[ ${UID} -eq 0 ]]; then
|
||||
echo "ERROR: Please run as root user!"
|
||||
exit 1
|
||||
fi
|
||||
_root_check
|
||||
echo -e "\e[1mCleaning blockdevice(s) $*...\e[m"
|
||||
echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on $* now! \e[m"
|
||||
sleep 10
|
||||
|
|
|
@ -14,12 +14,8 @@ _usage()
|
|||
exit 0
|
||||
}
|
||||
##################################################
|
||||
[[ -z "${1}" ]] && _usage "$@"
|
||||
### check for root
|
||||
if ! [[ ${UID} -eq 0 ]]; then
|
||||
echo "ERROR: Please run as root user!"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z "${1}" ]] && _usage
|
||||
_root_check
|
||||
echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${1} now! \e[m"
|
||||
sleep 10
|
||||
# clean partitiontable
|
||||
|
|
Loading…
Reference in a new issue