source: MondoRescue/branches/2.06/mondo/mondo/restore-scripts/mondo/mount-me@ 273

Last change on this file since 273 was 273, checked in by bcornec, 18 years ago

Patches from Sébastien Aperghis-Tramoni <maddingue@…>

replace several occurences of "cat .. | grep .."
or with similar commands that accept filenames as arguments.
+ some sort | uniq replaced by sort -u

  • Property svn:keywords set to Id
File size: 516 bytes
RevLine 
[1]1#!/bin/sh
2
3mountlist=/tmp/mountlist.txt
4
5if [ "$#" -ne "0" ] ;then
6 echo "mount-me <no params>"
7 echo "...mountlist is assumed to be at $mountlist"
8 exit 1
9fi
10
11if [ ! -f "$mountlist" ] ; then
12 echo "I cannot find the mountlist '$mountlist'. Aborting."
13 exit 1
14fi
15
[273]16paths=`grep -v " raid " $mountlist | grep -v "lvm lvm" | tr -s ' ' ' ' | cut -d' ' -f2 | sort`
[1]17> $mountlist.sorted
18for i in $paths ; do
19 grep " $i " $mountlist >> $mountlist.sorted
20done
21mount-subroutine-me < $mountlist.sorted
22exit $?
Note: See TracBrowser for help on using the repository browser.