Re: shellscript conditional to check for external disk

2008-06-23 Thread Helge Rohde
On Saturday 21 June 2008 22:47:31 Roland Smith wrote: On Sat, Jun 21, 2008 at 09:44:09PM +, Helge Rohde wrote: Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy

Re: shellscript conditional to check for external disk

2008-06-23 Thread Roland Smith
On Mon, Jun 23, 2008 at 05:25:58PM +, Helge Rohde wrote: On Saturday 21 June 2008 22:47:31 Roland Smith wrote: On Sat, Jun 21, 2008 at 09:44:09PM +, Helge Rohde wrote: Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup

Re: shellscript conditional to check for external disk

2008-06-23 Thread Helge Rohde
On Monday 23 June 2008 18:24:59 Roland Smith wrote: On Mon, Jun 23, 2008 at 05:25:58PM +, Helge Rohde wrote: On Saturday 21 June 2008 22:47:31 Roland Smith wrote: On Sat, Jun 21, 2008 at 09:44:09PM +, Helge Rohde wrote: Is there a canonical way to achieve what i want? I played

Re: shellscript conditional to check for external disk

2008-06-22 Thread Wojciech Puchar
Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy as possible for the local staff, so i'd like to check whether the drive is attached, if necessary mount it, copy over the

Re: shellscript conditional to check for external disk

2008-06-22 Thread Roland Smith
On Sun, Jun 22, 2008 at 12:22:07AM +0100, RW wrote: On Sun, 22 Jun 2008 00:47:31 +0200 Roland Smith [EMAIL PROTECTED] wrote: Use glabel(8) to give the device an unique label. There is no telling which device /dev/da0s1d is pointing to! After labeling you can check for

Re: shellscript conditional to check for external disk

2008-06-22 Thread Roland Smith
On Sat, Jun 21, 2008 at 06:06:17PM -0500, Tim Daneliuk wrote: Use glabel(8) to give the device an unique label. There is no telling which device /dev/da0s1d is pointing to! After labeling you can check for /dev/fstype/yourlabel, which should be unique. Make sure to unmount the drive at

Re: shellscript conditional to check for external disk

2008-06-22 Thread RW
On Sun, 22 Jun 2008 11:13:15 +0200 Roland Smith [EMAIL PROTECTED] wrote: On Sun, Jun 22, 2008 at 12:22:07AM +0100, RW wrote: On Sun, 22 Jun 2008 00:47:31 +0200 Roland Smith [EMAIL PROTECTED] wrote: Use glabel(8) to give the device an unique label. There is no telling which device

Re: shellscript conditional to check for external disk

2008-06-22 Thread Camilo Reyes
the disk is detached. Bono Vince Malum -- -Camilo Date: Sat, 21 Jun 2008 21:44:09 + From: Helge Rohde [EMAIL PROTECTED] Subject: shellscript conditional to check for external disk To: freebsd-questions@freebsd.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us

Re: shellscript conditional to check for external disk

2008-06-22 Thread Wojciech Puchar
Jun 22 11:44:49 Christi kernel: umass0: SanDisk Corporation Cruzer Mini, class 0/0, rev 2.00/0.10, addr 2 on uhub4 Jun 22 11:44:49 Christi root: Unknown USB device: vendor 0x0781 product 0x5150 b us uhub4 Jun 22 11:44:49 Christi kernel: da0 at umass-sim0 bus 0 target 0 lun 0 Jun 22 11:44:49

shellscript conditional to check for external disk

2008-06-21 Thread Helge Rohde
Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy as possible for the local staff, so i'd like to check whether the drive is attached, if necessary mount it, copy over the

Re: shellscript conditional to check for external disk

2008-06-21 Thread Chuck Robey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Helge Rohde wrote: Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy as possible for the local staff, so i'd like to

Re: shellscript conditional to check for external disk

2008-06-21 Thread Roland Smith
On Sat, Jun 21, 2008 at 09:44:09PM +, Helge Rohde wrote: Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy as possible for the local staff, so i'd like to check

Re: shellscript conditional to check for external disk

2008-06-21 Thread Tim Daneliuk
Roland Smith wrote: On Sat, Jun 21, 2008 at 09:44:09PM +, Helge Rohde wrote: Hello List, I need to write a backup script, and one of the required actions would be a copy of the backup to an external firewire drive. I would like to make this as easy as possible for the local staff, so

Re: shellscript conditional to check for external disk

2008-06-21 Thread RW
On Sun, 22 Jun 2008 00:47:31 +0200 Roland Smith [EMAIL PROTECTED] wrote: Use glabel(8) to give the device an unique label. There is no telling which device /dev/da0s1d is pointing to! After labeling you can check for /dev/fstype/yourlabel, which should be unique. I think that should be: