diff options
Diffstat (limited to 'functions.sh')
-rwxr-xr-x | functions.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh index ceb848a..5d331e4 100755 --- a/functions.sh +++ b/functions.sh @@ -59,6 +59,21 @@ function error() { } +function check_environment() { + if [ "x${INSTALL_METHOD}" == "xurpmi" ]; then + hash /usr/sbin/urpmi + if [ 0 -ne ${?} ]; then + error "urpmi is missing." + fi + elif [ "x${INSTALL_METHOD}" == "xurpmi" ]; then + hash /usr/bin/dnf + if [ 0 -ne ${?} ]; then + error "dnf is missing." + fi + fi + ### TODO add other environmnet things, like : from function createchroot() +} + function verify_disk_space() { title "Verifying if there is enough space on disk to make the image" DISK_SPACE=$(/usr/bin/df -BG --output=avail "${INSTALL_PATH}" | sed '1d;s/[^0-9]//g') |