summaryrefslogtreecommitdiff
path: root/package/cfgfs/src
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-04-01 18:24:23 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-04-13 08:15:31 +0200
commit3bb2f83dcfb26c9da5f00523df3c956f78dffb3f (patch)
tree05b2ca4db4be0f37eb1af2c8e5118831f1ad741a /package/cfgfs/src
parent9df3f158bc3f5ad2cb80657dd53fa3df239b8b9d (diff)
cfgfs: add support for GPT on mmc devices
Diffstat (limited to 'package/cfgfs/src')
-rw-r--r--package/cfgfs/src/fwcf.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh
index 70d0fa5c0..8954c3645 100644
--- a/package/cfgfs/src/fwcf.sh
+++ b/package/cfgfs/src/fwcf.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (c) 2006-2007
# Thorsten Glaser <tg@mirbsd.de>
-# Copyright (c) 2009-2023
+# Copyright (c) 2009-2024
# Waldemar Brodkorb <wbx@openadk.org>
#
# Provided that these terms and disclaimer and all copyright notices
@@ -43,7 +43,7 @@
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
wd=$(pwd)
cd /
-what='Configuration Filesystem Utility (cfgfs), Version 1.11'
+what='Configuration Filesystem Utility (cfgfs), Version 1.12'
who=$(id -u)
if [ $who -ne 0 ]; then
@@ -142,9 +142,14 @@ if [ -z $part ]; then
part=$(fdisk -l /dev/sda 2>/dev/null|awk '{if ($2=="*") { print $1" "$9} else {print $1" "$8}}'|grep '^/dev.*88.*'|tail -1|awk '{ print $1 }')
# find GPT partition
if [ -z $part ]; then
- partnum=$(gdisk -l /dev/sda 2>/dev/null|fgrep "cfgfs"|awk '{ print $1 }')
+ partnum=$(gdisk -l $rootdisk 2>/dev/null|fgrep "cfgfs"|awk '{ print $1 }')
if [ ! -z $partnum ]; then
- part=/dev/sda${partnum}
+ echo $rootdisk|grep mmcblk >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ part=${rootdisk}p${partnum}
+ else
+ part=${rootdisk}${partnum}
+ fi
fi
fi
if [ -z $part ]; then