- added error managing on umounting dev, sys, proc
- corrected a bug in copyingsystem - corrected fstab - corrected a bug in copying tools
This commit is contained in:
parent
347ced325f
commit
27534ed173
@ -292,20 +292,24 @@ EOF" >>"$BUILD_PATH/second_stage_install.sh"
|
||||
/sbin/chroot --userspec root:root "$BUILD_PATH" /bin/bash -v -c 'sh /second_stage_install.sh'
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ];then
|
||||
warning "line $LINENO Warning : chrooting to $BUILD_PATH retrurn an error $RET "
|
||||
error "line $LINENO Warning : chrooting to $BUILD_PATH retrurn an error $RET"
|
||||
ERRORN=$((ERRORN++))
|
||||
fi
|
||||
info "unmounting dev, sys, proc"
|
||||
/bin/umount "$BUILD_PATH/dev"
|
||||
if [ $? -ne 0 ];then
|
||||
warning "line $LINENO Warning : error unmounting $BUILD_PATH/dev, continuing anyway"
|
||||
ERRORN=$((ERRORN++))
|
||||
fi
|
||||
/bin/umount "$BUILD_PATH/sys"
|
||||
if [ $? -ne 0 ];then
|
||||
warning "line $LINENO Warning : error unmounting $BUILD_PATH/sys, continuing anyway"
|
||||
ERRORN=$((ERRORN++))
|
||||
fi
|
||||
/bin/umount "$BUILD_PATH/proc"
|
||||
if [ $? -ne 0 ];then
|
||||
warning "line $LINENO Warning : error unmounting $BUILD_PATH/proc, continuing anyway"
|
||||
ERRORN=$((ERRORN++))
|
||||
fi
|
||||
}
|
||||
|
||||
@ -466,13 +470,9 @@ copyingsystem()
|
||||
|
||||
info "making /etc/fstab"
|
||||
echo "proc /proc proc defaults 0 0
|
||||
$BOOT_UUID /boot vfat defaults 0 0
|
||||
$ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PATH"/etc/fstab
|
||||
UUID=$BOOT_UUID /boot vfat defaults 0 0
|
||||
UUID=$ROOT_UUID / ext4 defaults 0 0" > "$BUILD_PATH"/etc/fstab
|
||||
|
||||
info "copying Mageia image to root partition"
|
||||
/bin/rsync -a --exclude "boot/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
|
||||
/bin/rsync -a "$BUILD_PATH/boot/" "$BOOT/"
|
||||
/bin/mkdir "$ROOT/boot"
|
||||
|
||||
case $TARGET in
|
||||
rpi)
|
||||
@ -508,11 +508,21 @@ brcmfmac" >> "$BUILD_PATH"/etc/modules
|
||||
exit 1
|
||||
fi
|
||||
info "copying tools in /usr/local/"
|
||||
/bin/cp -a "$SOURCE_PATH/tools" "/usr/local"
|
||||
/bin/cp -a "$SOURCE_PATH/tools" "$BUILD_PATH/usr/local"
|
||||
if ! [ $? -eq 0 ];then
|
||||
error "line $LINENO error copying tools"
|
||||
ERRORN=$((ERRORN++))
|
||||
fi
|
||||
;;
|
||||
xu3-4)
|
||||
;;
|
||||
esac
|
||||
|
||||
info "copying Mageia image to root partition"
|
||||
/bin/rsync -a --exclude "boot/" --exclude "qemu-arm-static*" "$BUILD_PATH/" "$ROOT/"
|
||||
/bin/rsync -a "$BUILD_PATH/boot/" "$BOOT/"
|
||||
/bin/mkdir "$ROOT/boot"
|
||||
|
||||
copyingcommon
|
||||
/usr/bin/sync
|
||||
/usr/bin/umount "$BOOT" "$ROOT"
|
||||
@ -767,3 +777,5 @@ case $OPT in
|
||||
installbasesystem
|
||||
;;
|
||||
esac
|
||||
|
||||
warning "Some errors occurs : $ERRORN errors"
|
||||
|
Reference in New Issue
Block a user