Script after unmount with autofs

I have a small embedded home server running arch linux, now it should manage many (~10) external hd's. i mount them with autofs and share the /mnt folder with samba and nfs. after 10 minutes inactivity, i unmount each hard drive. is it possible to start a script when a hard drive unmounts, and to start another script when autofs mounts it again? the script talks to the serial port and a microcontroller turns off each hard drive.

The AE scripting host only works with AE running. It doesn't even work with just hooking up to ESTK. You realyl need to run the AE process one way or another. Of course scripts can be invoked by triggering teh respective menu commands or providing them as commandline parameters then, but that very much is the long and short of it. Generally one would rather run a plug-in or script panel from within AE and connect to the external processes...
Mylenium

Similar Messages

  • Is it possible to script After Effects with Visual Studio?

    It's fairly easy to do with Illustrator, but I can't seem to find any documentation about how to do it with After Effects.
    With Illustrator, I can simply import the ScriptingSupport.aip to Visual Studio as a reference and have full c# access.
    Can't seem to find the equivalent in After Effects.
    If that doesn't exist, is there a way to kick off an AE script from c#?

    The AE scripting host only works with AE running. It doesn't even work with just hooking up to ESTK. You realyl need to run the AE process one way or another. Of course scripts can be invoked by triggering teh respective menu commands or providing them as commandline parameters then, but that very much is the long and short of it. Generally one would rather run a plug-in or script panel from within AE and connect to the external processes...
    Mylenium

  • Problem with Java Script after upgrade from BW 3.5 to BI7

    Dear Colleagues,
    We're facing the issue with Java Script after upgrade of BW 3.5 to BI7.
    Just after update we checked the basic functionality and it occured that some of web templates that use Java Script don't work. They generate seelction screen, but after selection the screen becomes blank without any error messages.
    We're currently stucked since web templates weren't converted to BI7 version so they should work exactly as before the upgrade.
    We compared the Java code with other environment that was not upgraded - it's perfectly the same.
    The only explanation that comes to my mind is that some Java Script settings on the server level were changed during the upgrade but I have no idea where I can check that.
    Thanks in advance for any suggestions,
    Andrzej Bobula

    Hi Deepu,
    Thanks, it was great to read your reply and then few minutes later talk to you live on SDN Day!
    Unfortunately, http cache clean-up did not help. But there is another funny thing I found - for exactly the same 3.5 webtemplate html code returned from WebAS 3.5 was different then from 7.0.
    Unfortunately, this editor does not allow to paste complete code, even in CODE brackets, but here are main differences:
    <b>3.5</b>
       if (navigator.appName == "Microsoft Internet Explorer")
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=1&REQUEST_NO=1&CMD=GET_TEMPLATE"
    name="Content">
    and
    <b>7.0</b>
       if (navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)
    <frame src="/sap/bw/BEx?SAP-LANGUAGE=E&PAGENO=8&REQUEST_NO=0&CMD=GET_TEMPLATE"
    name="Content" 0nLoad="javascript:loadTitle()">
    (I intentionaly put 0 i/o o in 0nLoad, otherwise Forum's editor does not accept the text.
    How about SAP's claim that technical upgrade from 3.x to 7.0 changes nothing?
    Regards,
    Vitaliy

  • [Solved] systemd creates autofs after unmounting /boot

    After logging in, i unmount /boot, so that i can unplug the usb drive where it resides, then systemd creates this mount:
    # mount | grep /boot
    systemd-1 on /boot type autofs (rw,relatime,fd=26,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
    Typing this hangs forever:
    ls /boot
    /etc/fstab
    UUID=2D75-67FC /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro,nodev,nosuid,noexec 0 2
    I don't really know what to make of this. Seems like a bug, given that ls hangs forever instead of showing nothing.
    Last edited by teateawhy (2014-09-12 10:48:38)

    My bad, i really masked the mount unit. Will try again tomorrow.
    EDIT:
    After masking the automount unit, it looks like this:
    * /boot is mounted correctly at startup
    * after unmounting /boot manually, no autofs mount shows up anymore
    * ls does not hang and immediatly shows nothing, as expected
    # systemctl status boot.automount
    ● boot.automount
    Loaded: masked (/dev/null)
    Active: inactive (dead)
    # mount | grep /boot
    (No output)
    Last edited by teateawhy (2014-09-12 10:16:50)

  • Script for unmounting/deframenting exchange 2010 database

    hi all,
    i need a script to unmount exchange 2010 database, defrag it and mount it again.
    thanks for any comment you may add...

    Tried the above commands... works like a charm, but with the following modifications:
    1. Delete trash and recoverable items from all mailboxes, run repeatedly
    The command using is
    Search-Mailbox -Identity "mailbox.name" -SearchDumpsterOnly -DeleteContent
    1A. Determining Free Space in Mailbox Database
    The command using is
    Get-MailboxDatabase -Status | ft name,Availablenewmailboxspace,Databasesize
    2.Calculate the disk space to perform the defrag, the formula is
    (Databasesize-Availablenewmailboxspace)*1.1
    3.Dismount the mailbox database
    In EMS, go to the folder contain the database file then use the command
    Dismount-Database <DatabaseName>
    3A.Copy mailbox database (edb and all related log files) to another location
    In EMS, go to the folder contain the database file then use the command
    4.Defrag the edb file (eseutil will recreate a temp edb and rename to the new edb after successful complete it will delete the old edb file. If anything goes wrong, it will revert back to the old edb as in the /d)
    eseutil /d <file.edb>
    5.Mount again
    Mount-Database <DatabaseName>
    You are advised to purge (step 1) all mailboxes before eseutil or move mailbox, otherwise it will just carry all the sh!t over to the new mailbox anyway. I gave up trying to tally the total mailbox space used, the whitespace avail and the edb file size already.
    For example, not sure why there is such a disparity where by I have 30 2GB mailboxe est. at 60GB used, whitespace after mailbox move/eseutil at 95GB, the edb size is 106GB. This is where my older exchange 2003 edb files wins hands down. Better budget more
    storage for edb files! I am considering whether it's even worth migrating all to exchange 2010 altogether! The edb files are so damn space hungry even with 3 day retention and 6 day delete with 24/7 maintenance ticked. Exchange 2010 edb beast simply cannot
    be tamed.
    Personally I find in EMC to online move mailbox faster and more reliable overnight. Furthermore, you can simply create a new database, sort all mailboxes by database, select all of them, follow the wizard to move them all at once, the system simply queues
    them to move and complete. Overnight moving is the best, all will be done the next day.

  • Umount drives mounted with autofs

    Is it possible to allow users to call "umount" on drives that were mounted with autofs?  I have the following rules:
    cdrom -fstype=iso9660,ro,users,nodev,nosuid :/dev/cdrom
    floppy -fstype=auto,async,users,nodev,nosuid,umask=000 :/dev/fl
    usb -fstype=auto,async,users,nodev,nosuid,umask=000 :/dev/sdb1
    I am under the impression that if I mount with option "users", then users can umount the drives.  However, that option does not actually seem to be used.  Any ideas on how I can allow my users to umount these drives?

    Nope.  From `man mount':
    users:  Allow  every user to mount and unmount the file system.  This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
    Only the user that mounted a filesystem can unmount it again.  If any user should be able to unmount, then use users instead of user in the fstab line.  The owner option is similar to the user option, with the restriction that the user must be the owner of the  special  file. This may be useful e.g. for /dev/fd if a login script makes the console user owner of this device.  The group option is similar, with the restriction that the user must be member of the group of the special file.

  • ACROBAT STARTUP SCRIPTING NOT WORKING (with extendscript Tooklkit CS6)

    Hi
    I experienced in programming, but newbie in JS-Scripting in CS6.
    I have developed some scripts in the console of Acrobat XI Pro, now I wan't to install that global script callable by a menu.
    I work on Windows-7, with 64bit:
    The script path is:
    C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts
    script name is Confg.js
    The script is created with Extendscript Tooklkit CS6 editor
    only contains this line:
    app.alert("Hi, from a globally executed script");
    I expect that an alert is poping up, when I open the Acrobat XI Pro with any PDF-File:
    for a change
    app.addMenuItem({cName:"Menu Test", cParent: "Help",   cExec: "app.alert('Menu Item Test'); "});
    doesn't work either
    after opening PDF XI Pro with an arbitry PDF I get an error in the console:
    Acrobat – Version mit integrierten EScript-Funktionen 11.0
    Acrobat SOAP 11.0
    SyntaxError: illegal character
    1:Folder-Level:App:Config.js
    If I create the file with a plain text editor, things will work fine, as expected.
    If I edit that clean file with Extendscript Tooklkit CS6 editor again the file is corrupted. This is rahter clumsy. Any solution, so I can work with Extendscript Tooklkit CS6 editor?

    Thanks for the reply.
    >>Acrobat is not one of listed programs that Extendscript is used with.
    I was already wondering about this. Thought my installation is corrupted or whatever
    Though with regret, I have to accept that Extendscript Toolkit can't be used with Acrobat XI scripting. I use jEdit meanwhile. This has syntax higlighting and a linenumbering, helpful to spot errorous linenumbers. This does the job so far.

  • How to automatically create the custom migration scripts after recreating SSMA project?

    How to automatically create the custom data migration scripts after recreating SSMA project?
    There is number of tables ( big tables with BLOBS)  which I want to set up automatically to be migrated with custom migration scripts (replacing e.g. attribute named "FILE" with "TO_BLOB('') AS FILE" ).
    So the question is how to open MB file (I think that it should be standard db of some destktop RDBMS) ? 

    Hi Roman.Pokrovskij,
    According
    to your description, we can use SSMA tool to migrate data from one database (including Access, Oracle and so on) to SQL Server via GUI or the scripts. There is an example about migrating Access database to SQL Server via the
    custom migration scripts, you can review refer to them.
    <?xml version="1.0" encoding="utf-8"?>
    <ssma-script-file xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Microsoft SQL Server Migration Assistant for Access\Schemas\A2SSConsoleScriptSchema.xsd">
    <config>
    <output-providers>
    <output-window suppress-messages="false"
    destination="stdout"/>
    <upgrade-project action="yes"/>
    <data-migration-connection source-use-last-used="true"
    target-server="target_1"/>
    <progress-reporting enable="false"
    report-messages="false"
    report-progress="off"/>
    <object-overwrite action="skip" />
    </output-providers>
    </config>
    <servers>
    <!-- Server definition for Sql server target server-->
    <sql-server name="target_1">
    <sql-server-authentication>
    <server value="$SQLServerName$"/>
    <database value="$SQLServerDb$"/>
    <user-id value="$SQLServerUsrID$"/>
    <password value="$SQLServerPassword$"/>
    <encrypt value="true"/>
    <trust-server-certificate value="true"/>
    </sql-server-authentication>
    </sql-server>
    </servers>
    <script-commands>
    <create-new-project project-folder="$project_folder$ "
    project-name="$project_name$"
    overwrite-if-exists="true"/>
    <connect-target-database server="target_1"/>
    <load-access-database database-file="$AccessDbFolder$\$AccessDatabaseFile$"/>---
    <!--Schema Mapping-->
    <map-schema source-schema="$AccessDatabase$" sql-server-schema="$SQLServerDb$.dbo" />
    <!-- Convert schema -->
    <!-- Example: Convert entire Schema (with all attributes)-->
    <convert-schema object-name="$AccessDatabase$"
    object-type="Databases"
    conversion-report-overwrite="true"
    verbose="true"
    report-errors="true" />
    <!-- Synchronize target -->
    <!-- Example: Synchronize target entire Database with all attributes-->
    <synchronize-target object-name="$SQLServerDb$.dbo"
    on-error="fail-script" />
    <!-- Data Migration-->
    <!--Example: Data Migration of all tables in the schema (with all attributes)-->
    <migrate-data object-name="$AccessDatabase$.Tables"
    object-type="category"
    report-errors="true"
    verbose="true"/>
    </script-commands>
    </ssma-script-file>
    There is a similar scripts about migrating Oracle database to SQL Server, you can use powershell script to automatically run the console for scripts/variable files, saved in the specified folder. For more information, review the following
    article.
    http://blogs.msdn.com/b/ssma/archive/2010/09/09/performing-database-migration-assessment-using-ssma-console-application.aspx
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Re-recording all of the eCATT scripts after system upgrade

    Hi,
    I’ve heard something today that got my attention: some people say that you have to re-record all of your scripts after an upgrade. In other words, upgrade from, for example, 5.0 to 6.0 makes eCATT scripts unusable and worthless.  It is not just some screens or screen sequences have changed, and must be re-recorded. It's a total change and <b>everything, all scripts</b>, have to be re-done.
    I would like to get some clarification on this.
    Thank you in advance, Alexei Merkoulov

    Yes, I've also heard about this before. We do not use a lot of CATT (it's been turned into the data loading tool), so it is not an issue for us.
    Here is my concern - we are on ECC 5.0 (WAS 6.40) and using eCATT to create and maintain scripts for automated functional testing. Let's say, we upgrade our system to 6.0 or 7.0, and want to use existing scripts for regression testing. I do not want to discover unexpectedly that our entire (all of it) existing body of automated scripts cannot function with the new version of the software.
    Please let me know if you have similar experience with managing eCATT scripts upgrade in the past (say 6.20 to 6.40).
    Thanks, AM

  • Script to unmount or eject disk images

    Is there a way to unmount disk images wiuth an automator or applescript? I have such a script to eject all disks, but this won't unmount disk images. I would like something that unmounts everything, except of course the startup disk etc.

    Andrew Gara wrote:
    That works!
    However, I still have the problem that it will only eject 1 of 2 or 2 of 3 or 3 of 4 etc. I always have to run the script again to eject the remaining disk or image.
    It says: Applescript error Finder got an error. Can't get disk 3 (or whatever is remaining.)
    I really appreciate your help btw.
    this of course makes sense because once a disk is ejected it's not counted among the remaining disks. we should start ejecting from the last disk (see the script below). Also, as i found out, Finder's eject command in apple script doesn't unmount internal drives. At least it didn't for me. I' not sure what the story here is.
    One can circumvent this by calling a shell script command.
    Something along the following lines.
    tell application "Finder"
    set nmd to number of disks
    --this ejects externals and disk images
    if nmd > 1 then
    repeat with i from 2 to nmd
    eject disk (nmd - i + 2)
    end repeat
    end if
    --this ejects internals except for the start up
    set nmd to number of disks
    if nmd > 1 then
    repeat with i from 2 to nmd
    do shell script "diskutil unmount /Volumes/\"" & (name of disk (nmd - i + 2)) & "\"> /dev/null &"
    end repeat
    end if
    end tell
    I tested it on my computer and it ejects 10 disks and disk images well so I think it should work ok most of the times but there are probably situations when it will fail. I'm not sufficiently motivated to refine it.

  • [SOLVED] Execute script after login

    Hi,
    I want to execute a script after I logged in, but it fails. There is no problem, when I do this manually.
    My ~/.xsession:
    #!/bin/sh
    ~/bin/select-monitor.sh
    I tried to paste this in .xinitrc, also, but it fails, too.
    What can I do?
    EDIT: Okay, this has solved my problem:
    http://i3wm.org/docs/userguide.html#_au … i3_startup
    Greets
    Steffo
    Last edited by Steffo (2013-01-19 10:52:29)

    /etc/pam.d/common-auth exists only to be included in other, service-specific PAM files, so one can easily change auth mechanisms for all/majority services at once. You don't have it, so probably you have fully separate PAM files, without common include; so you should just apply those common-auth advices to all services you are going to modify. As always with PAM -- BE CAUTIOUS. Especially if your machine sits a few hundred km away

  • [svn:fx-trunk] 8909: * Fix to allow Script blocks interspersed with default property

    Revision: 8909
    Author:   [email protected]
    Date:     2009-07-29 13:19:07 -0700 (Wed, 29 Jul 2009)
    Log Message:
    Fix to allow Script blocks interspersed with default property
      children.
    QE notes:
    Doc notes:
    Bugs: SDK-22249
    Reviewer: Pete F.
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22249
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/ChildNodeHandler.java

    Add this to the end of your nav p CSS selector at Line 209 of your HTML file, after 'background-repeat...':
    margin-bottom: -2px;
    Your nav p will then look like this:
    nav p {
              font-size: 90%;
              font-weight: bold;
              color: #FFC;
              background-color: #090;
              text-align: right;
              padding-top: 5px;
              padding-right: 20px;
              padding-bottom: 5px;
              border-bottom-width: 2px;
              border-bottom-style: solid;
              border-bottom-color: #060;
              background-image: url(images/background.png);
              background-repeat: repeat-x;
              margin-bottom: -2px;

  • Where are my photos on the PC after sync with an iphone?  I know nobody out there is stupid enough to suggest to me that they are encrypted and inaccessible, right?  Seriously?  How stupid would Apple corporation have to be to do something like this?

    Where are my photos on the PC after synching with an iphone?  I know nobody out there is stupid enough to suggest to me that they are encrypted and inaccessible, right?  Seriously?  How stupid would Apple corporation have to be to do something like this? That would be just as foolish as making my music unusable on the PC...
    Okay, Let's assume that Apple is indeed THAT foolish.......How does one get the photos from the phone to the PC and still use them?

    The photos are still on your phone, and if enabled in your Photo Stream. They are not automatically transferred to your computer when syncing.
    See iOS: Import personal photos and videos from iOS devices to your computer and iCloud: My Photo Stream FAQ
    tt2

  • Songs purchased on iPhone through iTunes Store will not show up on iPhone after syncing with iTunes

    I recently purchased iTunes Match (about a month ago).  Since purchasing Match, any songs that I have bought on my iPhone 4S (32GB, Sprint) through the iTunes Store app will not sync back to my iPhone after syncing with iTunes on my computer.  I have iOS 7.1.2 and iTunes 11.3.0.54.  The only way I can get them to show back up in my iPhone music library so I can play them is by re-downloading the songs through the iTunes Store app.  Which is super annoying because now it is about 10 songs that keep doing this, and they are in multiple playlists.  Is anyone else having this problem and have you found any fixes?  Really regretting purchasing the iTunes Match (which is not enabled on my iPhone, just on my computer).

    How to create custom ringtones ...
    1. Open iTunes.
    2. Find the song that you want to make into a ringtone.
    3. Listen to the song and find the part of it you want to use. The chorus may be a good place to start.
    4. Write down the start and stop times of the clip.
    5. Right-click the song and select "Get Info."
    6. Click the "Options" tab.
    7. Type in the start time of your ringtone in the text box next to "Start Time" in the minutes:seconds (i.e., 2:01) format.
    8. Type in the end time of your ringtone in the text box next to "Stop Time." Make sure the ringtone is no more than 30 seconds long.
    9. Click "OK."
    10. Right-click your song again and select "Convert Selection to AAC." Wait for iTunes to convert your song. It will create a duplicate version.
    11. Right-click the ringtone and select "Delete."
    12. Click on the "Keep Files" button.
    13. Find the file. It's usually in your User folder under "Music > iTunes > iTunes Music" and under the band's name. It will have an extension of m4a.
    14. Replace the m4a extension of your ringtone with m4r. You can either double-click slowly to rename your file, or right-click and select "Get Info" on a Mac or "Rename" on a Windows PC.
    15. Click "Use .m4r" or the PC equivalent when the system warns you that the change may affect the use of your file.
    16. Double-click the ringtone file. ITunes will automatically add it to your ringtones folder in your iTunes Music Library.
    17. Connect your iPhone and sync your ringtones.
    Oh, also to change a file extension. (not sure on Mac), but in Windows you need to go to "control panel" select "folder options". You need to uncheck the box "hide file extension for known file types". This will allow you to view and change the files extensions.
    Hope this is useful ...

  • HT1386 how to delete photos from iphone after syncing with itunes

    is there anyway to automatically setup itunes or my iphone to delete my photos from iphone after syncing with itunes?

    Thank you! Syncing has always scared me...basically I am just afraid to lose any photos. But it worked. Again thank you

Maybe you are looking for

  • Lumpsum discount for ED subtotal before VAT in MIRO

    Dear all, How to give lumpsum discount after Excise duties subtotal,based on that total VAT is calculated in vendor bill booking ? Expecting ur valuable replies. Jeyakanthan Edited by: Jeyakanthan A on Jan 12, 2010 10:26 AM

  • Export fails in DBMS_METADATA.FETCH_XML_CLOB

    Hello, I am unable to export a schema using Enterprise Manager. After the job is successfully submitted, the job status is failed. The first reported error is: ORA-39125: Worker unexpected fatal error in KUPW$WORKER.GET_TABLE_DATA_OBJECTS while calli

  • Working with ProRez and wide screen 16x9

    So I am trying to edit HD down to SD using ProRez. FinalCut won't let me edit my sequence in real time unless I have it set to 720x480 with the Anamorphic check box clicked. The problem with this is that when I export out to quicktime and open it any

  • Qustion about the Audigy 2 ZS internal dr

    <FONT color=#6666ff size=5>I am a neat freak when it comes to my computer please all about air flow. Will i just got the Audigy 2 ZS platinum i was wondering if i could just use a Rounded IDE Single Device Cable. Also this sound card is great.

  • Import Logs

    We use SAP Hosted ESourcing.  I see where we can view import logs for supplier related files (through menu at Supplier Management -> Performance->Import Data). Is there a way to view the import logging of reference data files we send from our ECC and