mirror of
				https://github.com/kevinveenbirkenbach/linux-image-manager.git
				synced 2025-11-04 09:28:01 +00:00 
			
		
		
		
	Optimized chroot process
This commit is contained in:
		@@ -18,12 +18,16 @@ mount_partitions
 | 
			
		||||
mount_binds
 | 
			
		||||
 | 
			
		||||
info "ld.so.preload fix" &&
 | 
			
		||||
sed -i 's/^/#CHROOT /g' "$root_mount_path/etc/ld.so.preload" ||
 | 
			
		||||
sed -i 's/^/#CHROOT /g' "$root_mount_path""etc/ld.so.preload" ||
 | 
			
		||||
warning "Failed."
 | 
			
		||||
 | 
			
		||||
info "Copy qemu binary..." &&
 | 
			
		||||
cp -v /usr/bin/qemu-arm-static "$root_mount_path""usr/bin/" ||
 | 
			
		||||
error
 | 
			
		||||
 | 
			
		||||
info "copy qemu binary" &&
 | 
			
		||||
cp -v /usr/bin/qemu-arm-static "$root_mount_path/usr/bin/" ||
 | 
			
		||||
error
 | 
			
		||||
info "Copy resolve.conf..."
 | 
			
		||||
cp -v /etc/resolv.conf "$root_mount_path""etc/" &&
 | 
			
		||||
warning "Failed. Propably there is no internet connection available."
 | 
			
		||||
 | 
			
		||||
info "You will be transferred to the bash shell now." &&
 | 
			
		||||
info "Issue 'exit' when you are done." &&
 | 
			
		||||
@@ -34,8 +38,8 @@ error
 | 
			
		||||
 | 
			
		||||
info "Clean up" &&
 | 
			
		||||
info "revert ld.so.preload fix" &&
 | 
			
		||||
sed -i 's/^#CHROOT //g' "$root_mount_path/etc/ld.so.preload" ||
 | 
			
		||||
error
 | 
			
		||||
sed -i 's/^#CHROOT //g' "$root_mount_path""etc/ld.so.preload" ||
 | 
			
		||||
warning "Failed."
 | 
			
		||||
 | 
			
		||||
info "unmount everything" &&
 | 
			
		||||
umount "$root_mount_path"/{dev/pts,dev,sys,proc,boot,} ||
 | 
			
		||||
 
 | 
			
		||||
@@ -272,6 +272,10 @@ if [ "$password_1" == "$password_2" ]
 | 
			
		||||
  else
 | 
			
		||||
    error "Passwords didn't match."
 | 
			
		||||
fi
 | 
			
		||||
# @todo add to chroot
 | 
			
		||||
#pacman-key --init
 | 
			
		||||
#pacman-key --populate archlinuxarm
 | 
			
		||||
#pacman -Syyu
 | 
			
		||||
 | 
			
		||||
question "Type in the hostname:" && read -r hostname;
 | 
			
		||||
echo "$hostname" > "$root_mount_path""etc/hostname" || error "Changing hostname failed."
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user