small maj
This commit is contained in:
parent
8c2190b598
commit
19a14be866
@ -15,6 +15,9 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#Change the local to the most global
|
||||||
|
#LC_ALL="C"
|
||||||
|
|
||||||
function WaitToContinue()
|
function WaitToContinue()
|
||||||
{
|
{
|
||||||
read -p "Break... Press [ENTER] to continue." GARBAGE
|
read -p "Break... Press [ENTER] to continue." GARBAGE
|
||||||
@ -114,7 +117,7 @@ function unmounting()
|
|||||||
# info "Supposed image name : ${IMAGE}"
|
# info "Supposed image name : ${IMAGE}"
|
||||||
# info "Looped devices : $(losetup -l -O NAME,BACK-FILE -n)"
|
# info "Looped devices : $(losetup -l -O NAME,BACK-FILE -n)"
|
||||||
# info "Looped devices with this image : $(losetup -l -O NAME,BACK-FILE -n | grep "${IMAGE}" )"
|
# info "Looped devices with this image : $(losetup -l -O NAME,BACK-FILE -n | grep "${IMAGE}" )"
|
||||||
info "Looped devices to unmount : $(losetup -l -O NAME,BACK-FILE -n | grep "${IMAGE}" | cut -d ' ' -f 1 )"
|
info "Looped devices to unmount : $(losetup -l -O NAME,BACK-FILE -n | grep "${IMAGE}" | cut -d ' ' -f 1 ) "
|
||||||
|
|
||||||
# removing loop devices
|
# removing loop devices
|
||||||
# for LOOP in $(losetup -l -O NAME -n); do
|
# for LOOP in $(losetup -l -O NAME -n); do
|
||||||
@ -122,7 +125,7 @@ function unmounting()
|
|||||||
# losetup -d "${LOOP}" # Tell the kernel about the presence and numbering of partitions.
|
# losetup -d "${LOOP}" # Tell the kernel about the presence and numbering of partitions.
|
||||||
# done
|
# done
|
||||||
|
|
||||||
for LOOP in $(losetup -l -O NAME,BACK-FILE -n | grep "${IMAGE}" | cut -d ' ' -f 1 ); do
|
for LOOP in $(losetup -l -O NAME,BACK-FILE -n | grep "${IMAGE}" | cut -d ' ' -f 1 ) ; do
|
||||||
info "removing ${LOOP}"
|
info "removing ${LOOP}"
|
||||||
losetup -d "${LOOP}"
|
losetup -d "${LOOP}"
|
||||||
done
|
done
|
||||||
@ -199,7 +202,14 @@ function createchroot()
|
|||||||
function addmedia()
|
function addmedia()
|
||||||
{
|
{
|
||||||
title "Creating media ${MIRROR}"
|
title "Creating media ${MIRROR}"
|
||||||
|
|
||||||
|
if [ ! -z "${MIRROR}" ] ; then
|
||||||
/sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --distrib "${MIRROR}"
|
/sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --distrib "${MIRROR}"
|
||||||
|
else
|
||||||
|
info "MIRROR variable not set, using mirrorlist."
|
||||||
|
/sbin/urpmi.addmedia --urpmi-root "${BUILD_PATH}" --distrib --mirrorlist "http://mirrors.mageia.org/api/mageia.${MAGEIA_VERSION}.${ARM_VERSION}.list"
|
||||||
|
fi
|
||||||
|
|
||||||
err=${?}
|
err=${?}
|
||||||
if [ ${err} -ne 0 ]; then
|
if [ ${err} -ne 0 ]; then
|
||||||
error "line ${LINENO} error ${err} - can't add medias from ${MIRROR} : exiting"
|
error "line ${LINENO} error ${err} - can't add medias from ${MIRROR} : exiting"
|
||||||
@ -270,7 +280,7 @@ function installbasesystem()
|
|||||||
# error "line ${LINENO} error installing basesystem-minimal : exiting"
|
# error "line ${LINENO} error installing basesystem-minimal : exiting"
|
||||||
# exit ${ERR_1}
|
# exit ${ERR_1}
|
||||||
#fi
|
#fi
|
||||||
/sbin/urpmi --urpmi-root "${BUILD_PATH}" --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 0 urpmi locales-fr systemd u-boot
|
/sbin/urpmi --urpmi-root "${BUILD_PATH}" --ignorearch --no-verify-rpm --auto --split-level 200 --split-length 0 urpmi locales-fr u-boot
|
||||||
if [ ${?} -ne 0 ]; then
|
if [ ${?} -ne 0 ]; then
|
||||||
error "line ${LINENO} error installing urpmi or locales.fr : exiting"
|
error "line ${LINENO} error installing urpmi or locales.fr : exiting"
|
||||||
exit ${ERR_1}
|
exit ${ERR_1}
|
||||||
|
Reference in New Issue
Block a user