aboutsummaryrefslogtreecommitdiffstats
path: root/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions.sh')
-rwxr-xr-xfunctions.sh43
1 files changed, 19 insertions, 24 deletions
diff --git a/functions.sh b/functions.sh
index 549c627..cb27a57 100755
--- a/functions.sh
+++ b/functions.sh
@@ -100,32 +100,27 @@ function createchroot() {
fi
fi
- if ! [ -f /usr/bin/qemu-arm-static ]; then
- title "Qemu package not present : installing qemu packages"
- #/usr/bin/dnf --assumeyes --setopt=install_weak_deps=False install qemu-user-static
- installhostpkg "qemu-user-static" "--setopt=install_weak_deps=False"
- if [ ${?} -ne 0 ]; then
- error "line ${LINENO} can't install qemu-user-static : exiting"
- cleanExit ${ERR_1}
+ if [ `arch` != "${ARM_VERSION}" ]; then
+ if ! [ -f /usr/bin/qemu-arm-static ]; then
+ title "Qemu package not present : installing qemu packages"
+ #/usr/bin/dnf --assumeyes --setopt=install_weak_deps=False install qemu-user-static
+ installhostpkg "qemu-user-static" "--setopt=install_weak_deps=False"
+ if [ ${?} -ne 0 ]; then
+ error "line ${LINENO} can't install qemu-user-static : exiting"
+ cleanExit ${ERR_1}
+ fi
fi
- fi
- # Starting qemu service if not started
- print_info "check systemd-binfmt service : "
- /usr/bin/systemctl is-active systemd-binfmt.service
- if [ ${?} -ne 0 ]; then
- title "Starting systemd-binfmt.service"
- /usr/bin/systemctl start systemd-binfmt.service
- if [ ${?} -ne 0 ]; then
- error "line ${LINENO} can't start qemu-user-static : exiting"
- cleanExit ${ERR_1}
+ # Starting qemu service if not started
+ print_info "check systemd-binfmt service : "
+ /usr/bin/systemctl is-active systemd-binfmt.service
+ if [ ${?} -ne 0 ]; then
+ title "Starting systemd-binfmt.service"
+ /usr/bin/systemctl start systemd-binfmt.service
+ if [ ${?} -ne 0 ]; then
+ error "line ${LINENO} can't start qemu-user-static : exiting"
+ cleanExit ${ERR_1}
+ fi
fi
-# else
-# title "Restarting systemd-binfmt.service"
-# /usr/bin/systemctl restart systemd-binfmt.service
-# if [ ${?} -ne 0 ]; then
-# error "line ${LINENO} can't start qemu-user-static : exiting"
-# cleanExit ${ERR_1}
-# fi
fi
return 0
}