mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 11:30:37 +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
|
[[ -z "${1}" ]] && _usage
|
||||||
### check for root
|
_root_check
|
||||||
if ! [[ ${UID} -eq 0 ]]; then
|
|
||||||
echo "ERROR: Please run as root user!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo -e "\e[1mCleaning blockdevice(s) $*...\e[m"
|
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"
|
echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on $* now! \e[m"
|
||||||
sleep 10
|
sleep 10
|
||||||
|
|
|
@ -14,12 +14,8 @@ _usage()
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
##################################################
|
##################################################
|
||||||
[[ -z "${1}" ]] && _usage "$@"
|
[[ -z "${1}" ]] && _usage
|
||||||
### check for root
|
_root_check
|
||||||
if ! [[ ${UID} -eq 0 ]]; then
|
|
||||||
echo "ERROR: Please run as root user!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${1} now! \e[m"
|
echo -e "\e[91mWARNING: 10 seconds for hitting CTRL+C to stop the process on ${1} now! \e[m"
|
||||||
sleep 10
|
sleep 10
|
||||||
# clean partitiontable
|
# clean partitiontable
|
||||||
|
|
Loading…
Reference in a new issue