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/turnup | |
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/turnup')
-rw-r--r-- | packages/slugos-init/files/turnup | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup index d27648680f..f7fe0e7960 100644 --- a/packages/slugos-init/files/turnup +++ b/packages/slugos-init/files/turnup @@ -17,6 +17,10 @@ INRAM_DISK="" force= # +# pfile: the uuid/partition file +pfile=/etc/uuid_by_partition + +# # fstype new # The type of the file system mounted on "new" Outputs the last # piece of information found, which should be the one for the @@ -312,7 +316,7 @@ setup_rootfs() { # setup_fstab new fsdev fstype fsoptions # Alters the /etc/fstab entry for / to refer to the correct device and # have the correct type and options. Essential for checkroot to remount -# / with the correct options. +# / with the correct options. Writes the initial uuid file. # bad, since sed won't fail even if it changes nothing. setup_fstab() { sed -i '\@^[^ ]*[ ][ ]*/[ ]@s@^.*$@'"$2 / $3 $4 1 1"'@' "$1"/etc/fstab @@ -322,6 +326,11 @@ setup_fstab() { echo " to ensure that the root partition is mounted correctly" >&2 return 1 } + # + # build $pfile + uuid_by_partition >"$1""$pfile" || + echo "turnup: $pfile: blkid failed (ignored)" >&2 + return 0 } # |