Re: AppleScript-Users Digest, Vol 5, Issue 123
Re: AppleScript-Users Digest, Vol 5, Issue 123
- Subject: Re: AppleScript-Users Digest, Vol 5, Issue 123
- From: "John C. Welch" <email@hidden>
- Date: Thu, 21 Feb 2008 18:24:00 -0600
- Thread-topic: AppleScript-Users Digest, Vol 5, Issue 123
On 02/21/2008 14:11 PM, "Dolores Trujillo" <email@hidden> wrote:
>> On 02/20/2008 07:55 AM, "Dolores Trujillo" <email@hidden> wrote:
>>
>>> I need to write a script to run on an xserve, Tiger, to send an email,
>>> say to the sysadmin if the inventory of any of the internal hard
>>> drives have been removed or changed. Can someone help, I am just
>>> beginning to learn scripting. I've been looking for one that exists
>>> already but haven't found one yet.
>>
>> You really, really need to be more specific about "inventory of the internal
>> drives" here. Do you mean raw size, new files, what?
>>
>> --
> I need to know if the drives have removed (unmounted and pulled out, possibly
> replaced) so I guess with that said I need to know if the disk is not
> mounting or if the disk changes. So since each internal hard drive has its
> own serial number, I need to know if that changes, whether it was removed or
> differs. Probably new files as well.
A script is not a substitute for physical security. Create a proper physical
security setup, and you don't have to worry if drives have been removed.
Drives mounting can be checked in a number of ways, if nothing else, just
look for all mounted disks.
If you want to literally track every single file system event, then you
really need to learn lower level programming that AppleScript, i.e.
Cocoa/ObjC, and become one with the fsevents API.
About all AppleScript would be optimal for is mount checking. I think you
really need to ponder the problem you're trying to solve more.
--
There is no limit to the good you can do if you don't care who gets the
credit.
-General George C. Marshall
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden