mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-15 16:01:25 +00:00
Improve message output
This commit is contained in:
Regular → Executable
+5
-3
@@ -41,8 +41,7 @@ show_help() {
|
||||
# Function to find the squashfs file system start offset from a OpenWrt given file
|
||||
find_squashfs_offset() {
|
||||
local IMAGE_FILE="$1"
|
||||
echo >&2 "Start finding start of squashfs file system in file '"$IMAGE_FILE"' ..."
|
||||
|
||||
|
||||
# Use fdisk to find the squashfs partition
|
||||
local squashfs_start_sectors=`fdisk -l "$IMAGE_FILE" | awk '/^.*squashfs-combined.*.img2/ {print $2}'` # use the 4th ouput as sectors
|
||||
|
||||
@@ -61,7 +60,6 @@ find_squashfs_offset() {
|
||||
# Function to find the ext4 file system start offset from a OpenWrt given file
|
||||
find_ext4_offset() {
|
||||
local IMAGE_FILE="$1"
|
||||
echo >&2 "Start finding start of ext4 file system in file '$IMAGE_FILE' ..."
|
||||
|
||||
# Define the search boundary (in bytes)
|
||||
local SEARCH_BOUNDARY=200 # This is the search boundary for extracting data before and after 'rootfs_data'
|
||||
@@ -156,6 +154,10 @@ fi
|
||||
IMAGE_FILE="$1"
|
||||
CPU_ARCH="$2"
|
||||
|
||||
set -Eeuo pipefail
|
||||
|
||||
echo >&2 "Start finding file system offsets in file '"$IMAGE_FILE"' ..."
|
||||
|
||||
squashfs_start_offset=$(find_squashfs_offset "$IMAGE_FILE")
|
||||
|
||||
if [ $CPU_ARCH = "aarch64" ]; then
|
||||
|
||||
Reference in New Issue
Block a user