diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2006-02-01 08:25:30 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-02-01 08:25:30 +0000 |
commit | 9c6194db05ec44fb2f1cf4a0032fc050d35d47b5 (patch) | |
tree | 3daa148dc3353e061cf83cb33316d6b6c8240b3d /packages/slugos-init/files/functions | |
parent | 594313d9d9a596e54ece19ccda7a4c3602fea55e (diff) |
slugos-init: add init script to handle USB device moving in 0.10
- the init.d script fixfstab uses blkid to build a partition/uuid
mapping table and compares this to the version from the previous
boot, if anything changes /etc/fstab is updated
Diffstat (limited to 'packages/slugos-init/files/functions')
-rw-r--r-- | packages/slugos-init/files/functions | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/slugos-init/files/functions b/packages/slugos-init/files/functions index d631579966..ef10d65fb2 100644 --- a/packages/slugos-init/files/functions +++ b/packages/slugos-init/files/functions @@ -372,3 +372,17 @@ umountflash(){ return 0 } + +# +# uuid_by_partition +# output a list of partitions and their UUIDs +uuid_by_partition() { + blkid -c /dev/null -s UUID | sed -n 's/^\([^:]*\): .*UUID="\([^"]*\)".*$/\1 \2/p' +} + +# +# partition_of uuid +# return the partition corresponding to the UUID +partition_of() { + sed -n 's/^\([^ ]*\) '"$1"'$/\1/p' +} |