From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Date: Tue, 22 Jan 2008 14:45:02 +0200 From: Michael Shigorin To: ALT Linux Sisyphus discussions Message-ID: <20080122124502.GA19490@osdn.org.ua> Mail-Followup-To: ALT Linux Sisyphus discussions References: <47947CF2.900@rambler.ru> <200801211726.47786.serpiph@nikiet.ru> <4794C53B.8020904@rambler.ru> <200801221113.54443.serpiph@nikiet.ru> <4795AB1A.90707@gmail.com> <44a30e20801220042y60dcfcc9k69045635be3646dc@mail.gmail.com> <20080122110910.GI19502@osdn.org.ua> <7377431a0801220426n3e1982f6rce07904d53f51018@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7377431a0801220426n3e1982f6rce07904d53f51018@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Subject: Re: [sisyphus] =?koi8-r?b?VVVJRCByZW5hbWVyICh3YXM6IHN1IC0gyczJIPPQ?= =?koi8-r?b?wdPFzsnFINLRxM/Xz8fPIPDPzNjaz9fB1MXM0Sk=?= X-BeenThere: sisyphus@lists.altlinux.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: shigorin@gmail.com, ALT Linux Sisyphus discussions List-Id: ALT Linux Sisyphus discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Jan 2008 12:45:04 -0000 Archived-At: List-Archive: List-Post: --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit On Tue, Jan 22, 2008 at 03:26:29PM +0300, Yuriy Al. Shirokov wrote: > > Тем временем желающие могут посмотреть скриптик в аттаче, > > автор -- Аркадий Иванов. > "Где?"(с) :) Ой! -- ---- WBR, Michael Shigorin ------ Linux.Kiev http://www.linux.kiev.ua/ --uAKRQypu60I7Lcqm Content-Type: application/x-sh Content-Disposition: attachment; filename="renamer.sh" Content-Transfer-Encoding: quoted-printable #!/bin/bash=0A=0Aif [ -f /etc/fstab -a ! -z /etc/fstab ]=0Athen=0A cp -= f /etc/fstab /etc/fstab.orig=0A if [ $? !=3D 0 ]=0A then=0A echo "Err= or making reserve copy of fstab. Stopping script"=0A exit 1=0A fi=0Aelse= =0A echo "Smth wrong with /etc/fstab. Stopping script"=0A exit 1=0Afi= =0A=0Acat /etc/fstab |\=0A while read line; do=0A if [ `echo $line |grep= ^UUID|wc -l` !=3D 0 ]=0A then=0A UUIDline=3D`echo $line |cut -d' ' -f = 1`=0A blkid |sed s/\"// |grep "$UUIDline" |\=0A while read blki= dline; do=0A inblk=3D$blkidline=0A dev=3D"`echo -n $inblk |cut -d: -f 1`"= =0A rest=3D"`echo $line |sed s/$UUIDline//`"=0A echo "$dev $rest"=0A = done=0A else =0A echo $line=0A fi=0A done=0A =0A=0A --uAKRQypu60I7Lcqm--