Why does this script error on shutdown?

it's the one from this package: http://aur.archlinux.org/packages.php?d … =1&ID=2885
http://aur.archlinux.org/packages/oss2j … ck/os2jack
Although it works good it spouts some ugly error on shutdown(although it manages to shutdown correctly)
Now i just copied the code from some other script so i don't know what could be wrong. So please, all you bash ppl out there!
/me makes mental note to read the rest of RUTE linux manual to 'get' this stuff more.

Well, at a first glance, the script backgrounds the kill command and then checks the return status, which I'm pretty sure doesn't work... so it probably does it's job, but looks as if it's failing.

Similar Messages

  • Why does this cause error (ORA 01008: Not all variables bound)

    When I assign values to parameters for a command object, I used the following code with the .NET provider:
    If oReq.CritSpec = Nothing Or oReq.CritSpec = "" Then
    cmdReq.Parameters.Add(":po5", DBNull.Value)
    Else
    cmdReq.Parameters.Add(":po5", oReq.CritSpec)
    End If
    This works fine, but when I switch to using ODP it generates the 'not all variables bound' error. I checked the parameter's status and it was Success. However, if I change the second line of the statement to
    If oReq.CritSpec = Nothing Or oReq.CritSpec = "" Then
    cmdReq.Parameters.Add(":po5", OracleDbType.Varchar2, DBNull.Value, ParameterDirection.Input)
    Else
    cmdReq.Parameters.Add(":po5", nReq.CritSpec)
    End If
    It seems to be OK. So my question is - why does the first statement generate the error? Am I misinterpreting the overloaded constructor or it it a bug in my code? Thanks.
    ck

    No need to answer, I solved it.
    For anyone else who might run into this, there were two issues:
    1. Assigning DBNull.Value to a parameter without specifying the parameter's type causes the Value property for that parameter to not be initialized. If you reference it, it will come back as a runtime error (check it first by testing for IsNot Nothing).
    2. In my update code, I have a lot of where clauses like "WHERE (COL1 = :1 OR COL1 IS NULL AND :1 IS NULL)". The default binding for parameters treats these two references to :1 as two different parameters. Setting BindByName to true solves the problem.
    ck
    Edited by: user536671 on Feb 15, 2009 7:04 PM

  • Why does this script behavior change with the phase of the moon ?

    Can anyone from adobe corp or non-adobe volunteers tell me where to look in their docs to find out why this script change its behavior or how to use the debugger to figure out the same. I read the guide and the whole section on debugger and break points etc well.
    try{
    this.getField('Button4').strokeColor = color.red   ;
    app.setTimeOut( "this.getField('Button4').strokeColor = color.green ;" , 500 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.blue  ;" , 1000 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.red   ;" , 1500 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.green ;" , 2000 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.blue  ;" , 2500 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.red   ;" , 3000 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.green ;" , 3500 );
    app.setTimeOut( "this.getField('Button4').strokeColor = color.blue  ;" , 4000 );
    catch(e){}
    Sometimes the above script cycle thru all the colors in proper order and other time it get stuck.
    I have linked it to a button so its part of the button javascript.
    Is there a way to craft setTimeOut calls that it becomes a reliable delay ?
    How to craft it such that the file does not change and does not have to be saved ? This is wanted in addition but not the essential issue at the moment.
    Thanks,
    Rainbow

    MAXcount=20
    // Create a simple color animation on a field called “Color” that changes every second.
    function DoIt() {
      var f = this.getField("Button4");
      var nColor = (timeout.count++ % 10 / 10);
      // Various shades of red.
      var aColor = new Array("RGB", nColor, 0, 0);
      f.fillColor = aColor;
      console.println( 'change' + ' ' + nColor + '; count=' + timeout.count );
      if (timeout.count >= MAXcount)
        app.clearInterval ( timeout );
    console.show();
    console.clear();
    console.println('Start');
    // save return value as a variable
    timeout = app.setInterval("DoIt()", 1000);
    // Add a property to our timeout object so that DoIt() can keep a count going.
    timeout.count = 0;
    console.println('End of code');
    // And observe the results. I expect your new timer events are conflicting with each other. Note that in the above code the change is performed within the called function and not as new line of code.
    I ran it but did not follow your last comment and acrobat disk icon prompts for saving the file. Can anyone remove this "latter problem" ? Can it be solved by any means ?

  • Why does this script changes modification date???

    Hello All,
    I am using this script with an Acrobutton to advise my users of the current PDF version.
    var stmDoc = Collab.documentToStream(this)
    var strDoc = util.stringFromStream(stmDoc);
    var strVer = strDoc.substr(5,3)
    app.alert({cMsg: "The PDF version is: " + strVer, nIcon: 3, nType: 0, cTitle: "PDF Version Check"});
    Problem is that when closing the document, even though not prompted, the file is saved (assumed, since the modification date changes).
    Is there anything about this script that is doing this?

    I added a "this.dirty = false;" to the end, but it does not do as I had hoped. The pdf does not prompt for a save, which is what I understand the dirty flag to be effecting. The modification date changes anyway. Am I not using the dirty flag correctly? Thanks in advance for your help.

  • [Unknown] Bash: Why does this script break my environment?

    I'm trying to build a script to do a couple makepkg tasks and it looks like I'm having trouble with a function breaking the environment.  The function does several commands and then breaks makepkg.  After I run the script, makepkg runs as if no options are entered:
    makepkg -g
    ==> Check: Installer is the correct size.
    ==> Extracting archive...
    ==> Copying files...
    cp: cannot overwrite non-directory `/var/abs/local/personal/worldofgoo/pkg/usr/share/games/worldofgoo/WorldOfGoo' with directory `WorldOfGoo'
    ==> ERROR: An unknown error has occurred. Exiting...
    Instead of the expected:
    makepkg -g
    ==> Retrieving Sources...
    -> Found worldofgoo.desktop in build dir
    ==> Generating checksums for source files...
    md5sums=('e49849a66aa50065d4d548653a33cc23')
    Here's the script it just started happening when I added the function.  I think it has to do with the curly brackets that awk uses.
    #!/bin/bash
    # mp - makepkg package building tasks
    # Add md5sums following source array in PKGBUILD
    md5add () {
    # Delete previous md5sum entries
    sed -i '/^md5sums/,/).*$/d' PKGBUILD
    # Add md5sums to end if PKGBUILD
    makepkg -g >> PKGBUILD
    # Move md5sums to follow source array
    awk 'BEGIN {
    checkAt = 0
    filesAt = 0
    scanning = 0
    /md5sums=\(/ {
    checkAt = NR
    scanning = 1
    /source=\(/ {
    filesAt = NR
    scanning = 1
    /)$/ {
    if (scanning) {
    if (checkAt > filesAt) {
    checkEnd = NR
    } else {
    filesEnd = NR
    scanning = 0
    lines[NR] = $0
    END {
    for (i = 1; i <= NR; ++i) {
    if (checkAt <= i && i <= checkEnd) {
    continue
    print lines[i]
    if (i == filesEnd) {
    for (j = checkAt; j <= checkEnd; ++j) {
    print lines[j]
    }' PKGBUILD > /tmp/PKGBUILD.tmp
    if [ -f /tmp/PKGBUILD.tmp ]; then
    mv /tmp/PKGBUILD.tmp PKGBUILD
    fi
    # Remove trailing blank lines
    while [ "$(tail -n 1 PKGBUILD)" == "" ]; do
    sed -i '$d' PKGBUILD
    done
    # Options
    case $1 in
    p ) if [ ! -f ./PKGBUILD ]; then
    echo "No PKGBUILD in this directory ($(pwd))"
    exit; else
    makepkg -sf
    fi
    s ) if [ ! -f ./PKGBUILD ]; then
    echo "No PKGBUILD in this directory ($(pwd))"
    exit 1; else
    echo "adding md5sums"
    md5add
    makepkg -f --source
    fi
    * ) # Display usage if full argument isn't given
    echo " ${0##*/} <option> - makepkg building tasks:"
    echo " p - build package (also installs dependencies)"
    echo " s - build source-only tarball (adds md5sums, tars for submission)"
    exit
    esac
    I have to restart to reset the environment (logout doesn't work) so I'l like to be able to fix this .  Any ideas?
    Last edited by Gen2ly (2009-10-30 15:19:17)

    Just reinstalled and not having it come up again.  Putting this in wonderland.
    Last edited by Gen2ly (2009-10-30 15:18:44)

  • Why does this script beep at me :-(

    Writing a script that creates job folders and duplicates files, all works great, but when I save the script as an application, I get a beep after every file is copied.
    Perhaps I am doing something wrong, so I created a test script just that just copies files and the same thing happens, when I run it the files get copied, and at the end it beeps once, save it as an application, the files get copied, but I get four beeps.
    this is sample script:
    -- move file test
    tell application "Finder"
    set FromFolder to "Macintosh HD:Users:cls:Scripts Test Center:NewJob:MoveFromFiles:"
    set ToFolder to "Macintosh HD:Users:cls:Scripts Test Center:NewJob:MoveToFiles:"
    set FileName to "NewJob1.txt"
    set MvFile1 to FromFolder & FileName
    set FileName to "NewJob2.txt"
    set MvFile2 to FromFolder & FileName
    set FileName to "test1.tif"
    set MvFile3 to FromFolder & FileName
    set FileName to "test2.tif"
    set MvFile4 to FromFolder & FileName
    duplicate file MvFile1 to ToFolder
    duplicate file MvFile2 to ToFolder
    duplicate file MvFile3 to ToFolder
    duplicate file MvFile4 to ToFolder
    end tell
    as I said this is just a test, my original intent is to copy files from different locations, but this test has the same one beep per file after saving as an application.
    Can I turn off the beep, or am I doing something wrong?
    Thanks

    Hi ErstO. Welcome to Apple Discussions!
    You can hear a beep even when you duplicate a file with ⌘D in the Finder. That's normal. Try this:
    *set FromFolder to "Macintosh HD:Users:cls:Scripts Test Center:NewJob:MoveFromFiles:"*
    *set ToFolder to "Macintosh HD:Users:cls:Scripts Test Center:NewJob:MoveToFiles:"*
    *set MvFile1 to FromFolder & "NewJob1.txt"*
    *set MvFile2 to FromFolder & "NewJob2.txt"*
    *set MvFile3 to FromFolder & "test1.tif"*
    *set MvFile4 to FromFolder & "test2.tif"*
    *set volume with output muted* -- StandardAdditions.osax > Miscellaneous Commands
    *tell application "Finder"*
    *   duplicate file MvFile1 to folder ToFolder* -- the word folder is required before the path
    *   duplicate file MvFile2 to folder ToFolder*
    *   duplicate file MvFile3 to folder ToFolder*
    *   duplicate file MvFile4 to folder ToFolder*
    *end tell*
    *delay 1* -- should be enough
    *set volume without output muted*
    Hope it can help.
    (The script seems to work even without the word folder being put before the ToFolder path. However, if you open the Event Log History window after having run the script, you will see a huge difference.)
    Message was edited by: Pierre L.

  • Why does this script fail with OS X Lion?

    The following AppleScript has been woorking just fine ronning Snow Leopard. Under Lion only the first site is loaded and the other Safari tabs are Untitled. Does anyone know what is wrong and how do I fix it? Thanks for any help.
    Hugh
    ---------------------------------------------------- Non-working script ---------------------------------------------------------------------
    tell application "Safari"
              open location "http://www.macrumors.com/"
              tell window 1 to set current tab to make new tab with properties {URL:"http://www.macworld.com/"}
              tell window 1 to set current tab to make new tab with properties {URL:"http://www.macnn.com/"}
              tell window 1 to set current tab to make new tab with properties {URL:"http://reviews.cnet.com/macfixit/?tag=mfiredir"}
              tell window 1 to set current tab to make new tab with properties {URL:"http://www.macintouch.com/"}
              tell window 1 to set current tab to make new tab with properties {URL:"http://arstechnica.com/apple/"}
              tell window 1 to set current tab to make new tab with properties {URL:"http://www.appleinsider.com/"}
    end tell

    Does anyone know what is wrong and how do I fix it?
    Actually, I don't know why your script fails with Mac OS X Lion. I can only suggest the following workaround, which seems to work properly:
    set myURLs to {"http://www.macworld.com/", "http://www.macnn.com/", "http://reviews.cnet.com/macfixit/?tag=mfiredir", "http://www.macintouch.com/", "http://arstechnica.com/apple/", "http://www.appleinsider.com/"}
    open location "http://www.macrumors.com/"
    tell application "Safari"
        activate
        tell window 1 to repeat with thisURL in myURLs
            set current tab to make new tab
            my newTab(thisURL)
        end repeat
    end tell
    on newTab(theURL)
        tell application "System Events"
            keystroke "l" using command down
            keystroke theURL & return
        end tell
    end newTab

  • Why does this script not work when run with osascript cli?

    I wrote the following to interface with geektool to display a list of todo's on my desktop (i'm sure it's been done elsewhere, but I wanted to try it myself). I had it working fine until I tried ordering the output to place the highest priority items at the top of the list. The following code works properly during development in Script Editor, but when geektool launches the command using osascript ~/Library/Scripts/todos.scpt it only displays the initial "TODOS:" without displaying the rest of the info. Searching the Applescript Release notes, I found that some versions of Applescript 1.8 had issues with null characters when using the osascript cli, however, I'm running 1.10.7 so it shouldn't be an issue (and I'm not sure how to check for null characters in Applescript even if it were). Anybody have any ideas on what's going on here?
    set output to {"TODOS:
    set highpri to {}
    set medium to {}
    set low to {}
    set nada to {}
    tell application "iCal"
    repeat with i in calendars
    repeat with j in todos of i
    if (completion date of j as string) is equal to "" then
    if priority of j as string is equal to "high priority" then
    copy summary of j & "
    " to end of highpri
    end if
    if priority of j as string is equal to "medium priority" then
    copy summary of j & "
    " to end of medium
    end if
    if priority of j as string is equal to "low priority" then
    copy summary of j & "
    " to end of low
    end if
    if priority of j as string is equal to "no priority" then
    copy summary of j & "
    " to end of nada
    end if
    end if
    end repeat
    end repeat
    end tell
    return (output & highpri & medium & low & nada) as string

    well, i'd been pulling my hair out for quite a while with this and decided it was time to ask for help, but I thought I'd give it one last shot and found a resolution almost immediately. I figured that problem had to be caused by the way applescript was concatenating the lists, so I got rid of the lists completely and it still wouldn't work. This convinced me that it must be newline related since that was the only special character left in the string. I opened up the script in vi, but the default compiled script format is not human readable. The osascript man page indicated that it would accept both compiled and text scripts, so I gave it a try, and osascript handled the raw text file wonderfully.

  • Why does this script only work on mobile devices?

    Is there any reason this conditional statement would work on mobile devices and not in a desktop browser i.e. Chrome, Safari? I am using it in a scroll activated project to trigger a symbol to play forwards or backwards depending on where the playhead is in the symbol. Works great on an iPad but not Chrome, Safari on my desktop.
    if (sym.getSymbol("icons_sym").getPosition("back") ) {
    sym.getSymbol("icons_sym").playReverse();
    else {
       sym.getSymbol("icons_sym").play("front");
    Thanks,
    Mark

    Ivan
    Sorry, my original posting was complete rubbish - I'll try and find the right answer...
    HTH
    Regards Nigel
    Message was edited by:
    nthomas

  • While trying to instal Mountain Lion OS on my macbook pro, I got the error message that my HD was damaged and it reverted to my Lion OS. Why does this happen? I bought the OS online through the app store

    While trying to instal Mountain Lion OS on my macbook pro, I got the error message that my HD was damaged and it reverted to my Lion OS. Why does this happen? I bought the OS online through the app store.

    The Mountain Lion installer looks at your internal drive to make certain that it's error-free before continuing installation. You should have an application named "Install OS X Mountain Lion.app" in your Applications folder now so you shouldn't have to download it again. Do this...
    Boot to your Lion recovery partition by holding down both the Command and the R keys while booting. Open Disk Utility from the Recovery partition and select your hard drive (usually named "Macintosh HD" unless you've renamed it) and click on Verify Disk. If you come up with any errors, click on Repair Disk. At the end of the cycle you will get a message that the disk was successfully repaired or a message that the hard drive could not be repaired.
    If you're able to repair the disk, just reboot as normal and open the "Install OS X Mountain Lion.app" and the installation will proceed. If Disk Utility was unable to repair the disk, you need to get to your local Apple Store as soon as possible so that they can see if the disk is salvageable or beyond repair.
    Good luck,
    Clinton

  • I am always getting the message ' could not complete due to program error" Why does this happen

    I am always getting the message ' could not complete due to program error" Why does this happen

    Without knowing a lot more details we can't tell you anything. This is just the most generic Photoshop error message imaginable. What system are you on? What version of Photoshop? what are you doing when the error occurs? Provide as much info as you can. Refer to this as a start:
    Working with your Operating System’s Tools
    Mylenium

  • Why does an unknown error occur when I try to save a document as a word file?

    why does an unknown error occur when I try to save a document as a Word file?

    Hi Judy,
    Deleting the Preferences files seems to be missing from your list.
    Quit AppleWorks,
    In the Finder, go to:
    username > Library > Preferences
    In the Preferences folder:
    Locate and Delete the File com.apple.appleworks.plist
    Locate and Open the Folder AppleWorks
    In the AppleWorks folder, delete the following files:
    AppleWorks 6 Assistants Cache
    AppleWorks 6 Preferences
    AppleWorks 6 Translators Cache
    Optional:
    AppleWorks Button Bars
    This file contains your Button Bar preferences. If you have made changes to the Button Bar, but hanve NO issues that can be traced to the Button Bar, it may be left in place.
    Regards,
    Barry

  • Why does this message keep appearing when i try to instal windows 7 through bootcamp? - "something went wrong and the USB cannot be configured for the installation"

    Why does this message keep appearing when Itry to instal windows 7 through bootcamp? - "Your bootable USB drive could not be created. An error occurred while copying the Windows installation files."

    Found a solution!
    Follow the extended version of these directions here:
    https://discussions.apple.com/docs/DOC-3581
    Worked like a charm!

  • I use Firefox 6.0.2. When I shut the browser and try to reopen it I get a message saying that Firefox is still running and that I should reboot. This happens constantly. Why does this happen and is there a way around it?

    I use Firefox 6.0.2. When I shut the browser and try to reopen it I get a message saying that Firefox is still running and that I should reboot. This happens constantly. Why does this happen and is there a way around it?

    There are a few possible causes for that error, for details see [[Firefox is already running but is not responding]].

  • TS4268 My iMessage doesn't work on my iPad. My software is up to date, wifi is working, apple ID is working but the verification stops and goes back to sign on. Why does this happen?

    My iMessage doesn't work on my iPad. My software is up to date, wifi is working, apple ID is working but the verification stops and goes back to sign on. Why does this happen?

    Look at no. 5 in this text which was copied from Apple's support site for troubleshooting Messages and FaceTime activation.
    Troubleshooting Apple ID activation
    After each step, toggle iMessage and FaceTime off and then on again in Settings > Messages and Settings > FaceTime.
    Update to the latest version of iOS.
    Ensure that you have an active Internet connection. You can complete activation using Wi-Fi or a cellular data connection. Check your Wi-Fi network using standard Wi-Fi network troubleshooting.
    If you receive an error when signing in to your Apple ID, visit myinfo.apple.com, sign in to your account, and ensure that the primary email address has been verified.
    Ensure that FaceTime has not been restricted: Settings > General > Restrictions > FaceTime.
    In Settings > General > Date & Time, ensure that Set Automatically is on. If Set Automatically is on, but the incorrect time zone is displayed, turn Set Automatically off and then choose the correct time zone, date, and time. Then turn Set Automatically on again.
    Enable iMessage and FaceTime while connected to another Wi-Fi network in a different location.
    This is the support kb article.
    http://support.apple.com/kb/ts4268

Maybe you are looking for

  • MacBook Pro can't connect to wireless internet

    I have a MacBook Pro that I have had from about 3 years now. It's been great but earlier this week, it wasn't able to connect to the internet here at my school (college). I didn't think too much of it because my schools internet is always spotty and

  • HT1750 Why isn't my serial number recognized?

    Tried to contact Apple Support but need to provide serial #.  I copied/pasted serial # several times but I am continually informed that the number isn't recognized.  I bought my computer on June 24th and am trying to get the OS Mountain Lion because

  • New I Mac- safari does not show the URL window- help!

    My safari does not show the website address window, but everyone else in the family shows it. How do I fix this so that I can view the address window. Thanks.

  • How do i get MYpicture to show up when I call people?

    I recently changed my phone number and the former owner's facebook picture shows up on my daughter's phone when I call her

  • Add [+] plus [-] minus to collapsible tab

    Hi, I think this is an easy one, but I have searched high and low to find out how to accomplish this task . I want to add a small [+] symbol to the collapsable panel tab to give a visual aid showing the tab can be clicked to expand it.  Then, (and th