diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-31 17:11:13 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-05-31 17:11:13 +0200 |
commit | aeb84dbae5ebe6b03df58f83f13f3cade7cee7c6 (patch) | |
tree | b338b05c3f4236640f8d96960481dbf2bc5f0b73 | |
parent | eee3718f1ec72f689f3a241af008e985819826df (diff) |
cfgfs fine tuning
- fix typo in last commit
- use a special partition with type id 88 for x86
based machines
- try to automatically find backend storage device for
cfgfs, either partition with type x86 or mtd device
with name cfgfs
-rw-r--r-- | package/cfgfs/src/fwcf.sh | 11 | ||||
-rwxr-xr-x | scripts/install.sh | 1 |
2 files changed, 6 insertions, 6 deletions
diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh index c19e6240c..54503c55d 100644 --- a/package/cfgfs/src/fwcf.sh +++ b/package/cfgfs/src/fwcf.sh @@ -47,7 +47,7 @@ cd / what='Configuration Filesystem Utility (cfgfs), Version 1.06' who=$(id -u) -if [ $who -ne 0 ]; +if [ $who -ne 0 ]; then echo 'Exit. Configuration Filesystem Utility must be run as root.' exit 1 fi @@ -115,11 +115,10 @@ EOF exit 1 ;; esac -# find backend device -uname=$(uname -m) -if [[ "$uname" = "i586" ]];then - part=/dev/sda2 -else +# find backend device, first try to find partition with ID 88 +part=$(fdisk -l|awk '$5 == 88 { print $1 }') +if [ -z $part ]; then + # otherwise search for MTD device with name cfgfs part=/dev/mtd$(fgrep '"cfgfs"' /proc/mtd 2>/dev/null | sed 's/^mtd\([^:]*\):.*$/\1/')ro fi diff --git a/scripts/install.sh b/scripts/install.sh index eea8e54f1..ee45af031 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -149,6 +149,7 @@ let rootsize=$maxsize-1 $parted -s $1 unit cyl mkpartfs primary ext2 0 $rootsize $parted -s $1 unit cyl mkpart primary fat32 $rootsize $maxsize $parted -s $1 set 1 boot on +$sfdisk --change-id $1 2 88 fi if [ $? -eq 0 ];then |