Help me making a deamon script for a specific eth0 configuration

hi
my idea is to have a daemon script for configuring my eth0 device with specific settings to connect to my xbox.
i"ve got no idea on how to wirite a daemon script, so i hope to get some help from the community
eth0 sould have:
192.168.1.33  as ip
255.255.255.0 as netmask
192.168.1.1.55  as gateway

kriz wrote:
i k'no its possible with network deamon, but its a great investement to uncomment everytime my rc.conf, then /etc/rc.d/network start...
i"m using by default my wireless to connect to internet
don't want to use netcfg. want something like wpa_auto does for wireless conectons, just for eth0 specific settings
You need to uncomment it once and set the correct values. That's it.

Similar Messages

  • Need Help in creating Unix Shell Script for database

    Would be appreciable if some one can help in creating unix shell script for the Oracle DB 10,11g.
    Here is the condition which i want to implement.
    1. Create shell script to create the database with 10GB TB SPACE and 3 groups of redo log file(Each 300MB).
    2. Increase size of redolog file.
    3. Load sample schema.
    4. dump the schema.
    5. Create empty db (Script should check if db already exists and drop it in this case).
    6. Create backup using rman.
    7. restore backup which you have backed up.

    This isn't much of a "code-sharing" site but a "knowledge-sharing" site.  Code posted me may be from a questioner who has a problem / issue / error with his code.   But we don't generally see people writing entire scripts as responses to such questions as yours.  There may be other sites where you can get coding done "for free".
    What you could do is to write some of the code and test it and, if and when it fails / errors, post it for members to make suggestions.
    But the expectation here is for you to write your own code.
    Hemant K Chitale

  • Need help making a simple script for my webcam

    Hey everyone, fairly new to applescript programming. I just bought a usb camera for my macbook because I use it for video conferencing/playing around, and it is better quality than the built in isight. However, in order to use this camera I need to use drivers from a program called camTwist. This being said camTwist needs to be opened first and the usb camera must be selected from camTwist Step 1 list in order for any other application to use the camera. I just want to make a simple program that would open camTwist first, then select "webcam" from the list (double click it like I always have to in order to select it) in order to activate the driver, and then open photo booth which would then be using the camTwist driver in order to take pictures.
    I made a crude program but it does not automatically select "webcam" from the Step 1 list in camTwist:
    tell application "CamTwist" to activate
    delay 10
    tell application "Photo Booth" to activate
    that’s basically it. I set the delay to 10 seconds so that when camTwists boots up first I can manually select my webcam. HOWEVER, I would like to make a script that would boot up CamTwist first, select my webcam from the list automatically, and then open Photo Booth with the CamTwist webcam driver already selected.
    Don't know much about applescript so any help to make a working script to solve my problem would be greatly appreciated! Thanks!

    Solved my problem but now I need help with something else! First I used CamTwist user options to create user defined hot keys with the specific purpose to load the webcam. I chose Command+B. I tested it out in CamTwist and it worked. The program follows a logical order from there. First it loads CamTwist, then after a short delay it presses the hot keys in order to load the webcam from the video source list, then another short delay and Photo Booth is opened with the driver loaded from camTwist. Everything works Perfect! Here's the code:
    tell application "System Events"
    tell application "CamTwist" to activate
    delay 0.5
    --Press command+b which is a user defined hot key to load webcam
    key code 11 using command down
    end tell
    delay 0.5
    tell application "Photo Booth" to activate
    My Next question is, would it be possible with this same script to have both applications quit together. For example I always quit Photo Booth first, so when I quit photo booth is there a way to make CamTwist also quit and keep everything within the same script? Please let me know. This forum has been very helpful and lead me to a solution to my problem! Hoping I can solve this next problem as well! Thanks everyone.

  • Need help in writinf a stop script for a production server

    can somebody help me with a stop script which stops a jrun
    production server.
    jrun -stop production
    this command should work but how do i use this in a script .
    Thanks

    Hi,
    I highly recommend that you skip VBScript and learn PowerShell instead. This is pretty trivial in PowerShell:
    If ($env:COMPUTERNAME.Length -le 15) {
    # Do stuff
    # HINT: Look into Start-Service
    Write-Host "Under limit: $env:COMPUTERNAME"
    } Else {
    # Do optional stuff
    Write-Host "Over limit: $env:COMPUTERNAME"
    (OT: jrv - happy? =])
    If you must stick with VBScript for some odd reason, here's an example to get you started:
    Set wshNetwork = WScript.CreateObject( "WScript.Network" )
    strComputerName = wshNetwork.ComputerName
    If Len(strComputerName) <= 15 Then
    'Do stuff here when the name is short enough
    WScript.Echo "Under limit: " & strComputerName
    Else
    'Do stuff here when the name is too long (only if you want to)
    WScript.Echo "Over limit: " & strComputerName
    End If
    http://www.activexperts.com/activmonitor/windowsmanagement/adminscripts/services/
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • HELP!! Need a script for DUMMIES for a simple login/register feature

    I know very little html and am more of a designer, but my programmer has let me me down so I have to take this on myself.
    I want to include a very common feature where visitors register to my site, so I can collect some information and contact details from them, then they can access hidden pages of the site and receive some exclusive download links by email, allowing them to download content (only once). They can then login each time they visit with a userID or email and a password.
    My host supports almost every scripting language.
    I've been told PHP is what I need, but I know absolutley nothing about it. My host said there is templates for such a simple script out there on the net for free but I'm being passed from pillar to post with scripts for much more complicated and rarer scripts than I need.
    Hope you can help.
    LB

    Do I need to create a database to store users info first?
    Yes. Without a database, it won't work.
    Is this a basic html page with a table with lots and lots or rows and columns for each of the details they have entered (e.g Name, DOB, Address.....etc)??
    No, I'm afraid not. Dreamweaver's PHP server behaviors work in conjunction with the MySQL database. If your hosting company supports PHP, you will almost certainly have access to a MySQL database and phpMyAdmin, a web-based program that helps create and maintain MySQL databases. As a minimum, your users table in the database will need three columns:
    user_id (a number that acts as the primary key for each record)
    username
    password
    You can also have other columns to store other details, such as first name, family name, and any other information that you want to store.
    If you have never done any PHP or database development before, this is going to be a major undertaking for you. The Adobe Developer Centre has some articles that show you how to set up a PHP/MySQL testing environment (http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php.html) and create your first database-driven pages (http://www.adobe.com/devnet/dreamweaver/articles/php_event_registration.html). The Dreamweaver help files also step you through the process of creating a login system (http://help.adobe.com/en_US/Dreamweaver/10.0_Using/WScbb6b82af5544594822510a94ae8d65-7883a .html).
    Working with PHP/MySQL isn't difficult, but there's a lot to absorb. If you're going to start working with login systems and other database-driven features, you might find it useful to take a look at one of my books about Dreamweaver and PHP. I have different editions for Dreamweaver 8, CS3, and CS4. You can find more details at my website (http://foundationphp.com/).
    Good luck.

  • Can someone please help me making a native installer for air?

    hello, I’m a newbie in adobe flash cs6 and need step by step instructions for
    how to make a native installer to use the runtime api in adobe air 3.5
    I want to make a simple program with a button, if I press the button, a little exe file opens
    called “test.exe”
    my air profile is already extended desktop..
    (I use Windows7)
    I’ve read a lot of forums and they all say:
    Type something like this for the SDK or ATK or something in cmd:
    AirTest.airi -package -storetype pkcs12 -keystroke AirTest.p12 -target native AirTest.exe AirTest.airi
    I just kan’t figure out how to make a native installer from my air app…

    I use the NSIS for my windows native installer.
    http://nsis.sourceforge.net/Download
    If you are new to using NSIS, Venis is helpful for wizardizing your scripts:
    http://nsis.sourceforge.net/Venis_IX
    You will need to publish your app with the "-target bundle" setting

  • Help with EEM TCL / CLI scripting for re-direction/wccp counters

    Being new with EEM scripting I wanted to see if I was on the right track and get some help to finish my idea.
    Our problem I am trying to fix is our remote sites utilize pairs of Cat3650's for some routing and WCCP redirection.  We are encountering ACL denial issues causing slow down and access issues.  The fix for the issue we remove the WCCP service groups to break peering with our wan optimizers and re-insert the configuration thus re-establishing peering and restoring service.
    My idea is to use a TCL scipt on a watchdog timer to parse the "sh ip wccp | inc denied (or unassign)" output for denial and unassignable error counters.  If a counter is found I wanted to create a syslog message that would then kick off a simple EEM CLI script to remove the service groups, wait 10 seconds, then re-add the service groups.  Please point me in the right direction if I am off track as I am not sure if I can use the EEM CLI for all this or since I want to retreive specific info from the sh ip wccp output if I do need to utilize TCL.  I am also unsure if the "total denied" ascii string pulled via the "sh ip wccp | inc denied" will cause issues when attempting to just pull the counter information.
    sh ip wccp | inc Denied Red
            Total Packets Denied Redirect:       0
            Total Packets Denied Redirect:       0
    Script thus far :
    TCL
    if [catch {context_retrieve "EEM_WCCP_ERROR_COUNTER" "count"} result] {
    set wccpcounter 0
    } else {
    set wccpcounter $result
    } if [catch {cli_open} result] {
    error $result
    } else {
    array set cli $result
    } if [catch {cli_exec $cli(fd) "show ip wccp | incl Denied"} result] {
    error $result
    } else {
    set cmd_output $result
    set count ""
    catch [regexp {receive ([0-9]+),} $cmd_output} ignore count]
    set count
    set diff [expr $count - $wccpcounter]
    if {$diff != 0} {
    action_syslog priority emergencies msg "WCCP counters showing incremental Denied packet counts"
    if [catch {cli_close $cli(fd) $cli(tty_id)} result] {
    error $result
    context_save EEM_WCCP_ERROR_COUNTER count
    CLI
    event manager applet WCCP_COUNTER_WATCH
    event syslog priority emergencies pattern "WCCP counters showing incremental Denied packet counts"
    action 001 cli command "enable"
    action 002 cli command "config t"
    action 003 cli command "no ip wccp 61"
    action 004 cli command "no ip wccp 62"
    action 005 wait 10
    action 006 cli command "ip wccp 61"
    action 007 cli command "ip wccp 62"
    action 008 wait 15
    action 009 cli command "clear ip wccp"
    action 010 cli command "end"
    Thanks for all the help

    This won't work as EEM cannot intercept its own syslog messages.  However, I'm not sure why you need this form of IPC anyway.  Why not just make the Tcl script perform the needed CLI commands?
    And, yes, you could use all applets here.  But since you've written the hard stuff in Tcl already, it might be best just to add the missing calls to reconfigure WCCP to that script.

  • Help needed with a PS script for network share documentation

    I found a nice PS script that will do what I want, however the output portion seems to be broken. It will output the permissions and details, but not list what share it is referring to... Can anyone help with this?
    Thanks!
    https://gallery.technet.microsoft.com/scriptcenter/List-Share-Permissions-83f8c419#content
    <# 
               .SYNOPSIS  
               This script will list all shares on a computer, and list all the share permissions for each share. 
               .DESCRIPTION 
               The script will take a list all shares on a local or remote computer. 
               .PARAMETER Computer 
               Specifies the computer or array of computers to process 
               .INPUTS 
               Get-SharePermissions accepts pipeline of computer name(s) 
               .OUTPUTS 
               Produces an array object for each share found. 
               .EXAMPLE 
               C:\PS> .\Get-SharePermissions # Operates against local computer. 
               .EXAMPLE 
               C:\PS> 'computerName' | .\Get-SharePermissions 
               .EXAMPLE 
               C:\PS> Get-Content 'computerlist.txt' | .\Get-SharePermissions | Out-File 'SharePermissions.txt' 
               .EXAMPLE 
               Get-Help .\Get-SharePermissions -Full 
    #> 
    # Written by BigTeddy November 15, 2011 
    # Last updated 9 September 2012  
    # Ver. 2.0  
    # Thanks to Michal Gajda for input with the ACE handling. 
    [cmdletbinding()] 
    param([Parameter(ValueFromPipeline=$True, 
        ValueFromPipelineByPropertyName=$True)]$Computer = '.')  
    $shares = gwmi -Class win32_share -ComputerName $computer | select -ExpandProperty Name  
    foreach ($share in $shares) {  
        $acl = $null  
        Write-Host $share -ForegroundColor Green  
        Write-Host $('-' * $share.Length) -ForegroundColor Green  
        $objShareSec = Get-WMIObject -Class Win32_LogicalShareSecuritySetting -Filter "name='$Share'"  -ComputerName $computer 
        try {  
            $SD = $objShareSec.GetSecurityDescriptor().Descriptor    
            foreach($ace in $SD.DACL){   
                $UserName = $ace.Trustee.Name      
                If ($ace.Trustee.Domain -ne $Null) {$UserName = "$($ace.Trustee.Domain)\$UserName"}    
                If ($ace.Trustee.Name -eq $Null) {$UserName = $ace.Trustee.SIDString }      
                [Array]$ACL += New-Object Security.AccessControl.FileSystemAccessRule($UserName, $ace.AccessMask, $ace.AceType)  
                } #end foreach ACE            
            } # end try  
        catch  
            { Write-Host "Unable to obtain permissions for $share" }  
        $ACL  
        Write-Host $('=' * 50)  
        } # end foreach $share
    This is what the output looks like when ran with 'RemoteServer' | .\Get-SharePermissions.ps1 | Out-File 'sharepermissions.xls'
    FileSystemRights  : Modify, Synchronize
    AccessControlType : Allow
    IdentityReference : Everyone
    IsInherited       : False
    InheritanceFlags  : None
    PropagationFlags  : None

    Actually it is not being written only with Write-Host.  The last line of the loop is this "$ACL"  which ius an array of objects. 
    Here is a version that gets the info more easily and produces flexible objects.  It should be easier to modify into what is needed.
    # Get-ShareSec.ps1
    [cmdletbinding()]
    param(
    [Alias('ComputerName')]
    [Parameter(
    ValueFromPipelineByPropertyName=$True
    )]$Name=$env:COMPUTERNAME
    Process {
    Write-Verbose "Computer=$name"
    $shares =Get-WMiObject Win32_Share -ComputerName $name -Filter 'Type=0' -ea 0
    foreach($share in $shares){
    $sharename=$share.Name
    Write-Verbose "`tShareName=$sharename"
    $ShareSec = Get-WMIObject -Class Win32_LogicalShareSecuritySetting -Filter "name='$ShareName'" -ComputerName $name
    try {
    foreach ($ace in $ShareSec.GetSecurityDescriptor().Descriptor.DACL) {
    $props=[ordered]@{
    ComputerName=$name
    ShareName=$sharename
    TrusteeName=$ace.Trustee.Name
    TrusteeDomain=$ace.Trustee.Domain
    TrusteeSID=$ace.Trustee.SIDString
    New-Object PsObject -Property $props
    catch {
    Write-Warning ('{0} | {1} | {2}' -f $Computer,$sharename, $_)
    Get-Adcomputer -Filter * | .\Get-ShareSec.ps1 -v
    ¯\_(ツ)_/¯

  • Need some help in making a label disappear for certain time

    hi
    i need to make a program for my java class
    this is the question
    Design and implement a memory game. In this game you show the user a sequence of
    random integer numbers in the range of 0 to 99, and then ask him to type these
    numbers. Display how many he has remembered as a score. The level of game depends
    on how many numbers are there in the sequence. The duration of the display for the
    sequence is the speed. The user can adjust the level and the speed.
    my question is how to view the numbers for the game and make them disappear after certain time
    in need help with the syntax for it
    this is what i made so far
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import java.awt.FlowLayout;
    import java.awt.Color;
    import javax.swing.JButton;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    class game extends JFrame implements ActionListener {
    public static final int WIDTH = 500;
    public static final int HEIGHT = 300;
    public static final int x = 3;
    public static final int y = 3000;
    public static void main(String[] args) {
    game gui = new game( );
    gui.setVisible(true);
    public game( )
    super("MEMORY GAME");
    setSize(WIDTH, HEIGHT);
    setDefaultCloseOperation(JFrame.EXIT_ON_…
    setLayout(new BorderLayout( ));
    JPanel buttonPanel = new JPanel( );
    buttonPanel.setBackground(Color.LIGHT_GR…
    buttonPanel.setLayout(new FlowLayout( ));
    JButton b1 = new JButton("MAKE IT HAREDER!!!");
    b1.addActionListener(this);
    buttonPanel.add(b1);
    JButton b2 = new JButton("MAKE IT FASTER!!!");
    b2.addActionListener(this);
    buttonPanel.add(b2);
    add(buttonPanel, BorderLayout.SOUTH);
    public void actionPerformed(ActionEvent e)
    String buttonString = e.getActionCommand( );
    if (buttonString.equals("MAKE IT HAREDER!!!"))
    else if (buttonString.equals("MAKE IT FASTER!!!"))
    }

    To post code, use the code tags -- [code]Your Code[/code] will display asYour CodeOr use the code button above the editing area and paste your code between the {code}{code} tags it generates.
    I strongly suggest you forget about the GUI part and first make a console application that fulfils the game specifications. If you have problems with this, you can post your questions in the New to Java section of these forums.
    db

  • Help with newsletter PHP Mail script for mySQL / cron job

    I'm just trying to set up a PHP script to send emails as a cron job.
    It pretty much seems to work, but I can't get it to do two parts.
    The first part is to send the emails, and the second is to send a notification email to the site owner confirming that the emails have been sent.
    The script looks like:
    <?php
    include_once "connect_to_mysql.php";
    $sql = mysql_query("SELECT UserID, Firstname, Email, Newsletter_Received FROM Users WHERE Firstname='test' LIMIT 20");
    $numRows = mysql_num_rows($sql);
    $mail_body = '';
    while($row = mysql_fetch_array($sql)){
      $id = $row["UserID"];
      $email = $row["Email"];
      $name = $row["Firstname"];
      $mail_body = 'Test - please ignore';
        $subject = "Safari Awards Newsletter";
        $headers  = "From:[email protected]\r\n";
        $headers .= "Content-type: text/html\r\n";
        $to = "$email";
        $mail_result = mail($to, $subject, $mail_body, $headers);
      if ($mail_result) {
      mysql_query("UPDATE Users SET Newsletter_Received='1' WHERE Email='$email' LIMIT 20");
      } else {
    ?>
    <?php
    if ($numRows == 0) {
      $subj = "Newsletter Sent";
      $body = "The current newsletter has been sent to everyone.";
         $hdr  = "From:[email protected]\r\n";
         $hdr .= "Content-type: text/html\r\n";
         mail("[email protected]", $subj, $body, $hdr);
    ?>
    Basically with the line
    include_once "connect_to_mysql.php";
    included, it sends the emails as per the SELECT query, but does not send the 'Newsletter Sent' email.
    But if I take out that line, it obviously doesn't send the emails as per the SELECT query, but it does send the 'Newsletter Sent' email.
    Any suggestions on what might need changing in order for it to do both would be much appreciated!
    Thanks.

    Change this line -
    if ($numRows == 0) {
    to this -
    if ($mail_result) {

  • Help needed: making a psptoolchain package for arch

    Hi....
    I'm very new to archlinux (now using it for 3 weeks), but I really like it
    Now I tried to make a archlinux package for the psptoolchain (PSP's are so nice )
    I already got a working package for the psp-gcc and the psp-binutils (wrote my own PKGBUILD's) which came with the psptoolchain.
    But now I got stuck with psp-newlib and pspsdk.
    At the moment I'm building all the packages separately, but later I'll try to make one package for the whole psptoolchain....
    So here comes my problem with psp-newlib and pspsdk...
    psp-gcc -march=i686 -O2 -pipe -G0 -Wall -I../../src/base -I../../src/kernel -c sceAtrac3plus.S
    sceAtrac3plus.S:0: error: bad value (i686) for -march
    Assembler messages:
    Error: Bad value (i686) for -march
    make[3]: *** [sceAtrac3plus.o] Error 1
    make[3]: Leaving directory `/mnt/data/archlinux/packages/psptoolchain/pspsdk/src/pspsdk/src/atrac3'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/mnt/data/archlinux/packages/psptoolchain/pspsdk/src/pspsdk/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/mnt/data/archlinux/packages/psptoolchain/pspsdk/src/pspsdk'
    make: *** [all] Error 2
    ==> ERROR: Build Failed. Aborting...
    And here comes my PKGBUILD for psp-newlib:
    # Contributor: [email protected]
    pkgname=newlib
    pkgver=1.13.0
    pkgrel=1
    pkgdesc="GCC for psp-devel"
    url="http://ps2dev.org/psp/Tools/Toolchain/"
    depends=()
    makedepends=()
    source=(ftp://sources.redhat.com/pub/newlib/$pkgname-$pkgver.tar.gz)
    md5sums=('3d07cc367a22b78c44227456b0d3b7dc')
    build() {
    export PSPDEV="/usr/local/pspdev"
    export PATH="$PATH:$PSPDEV/bin"
    cp $startdir/newlib-1.13.0.patch /$startdir/src/$pkgname-$pkgver
    cd $startdir/src/$pkgname-$pkgver
    cat newlib-1.13.0.patch | patch -p1
    cd /$startdir/src/$pkgname-$pkgver
    BUILDDIR="/tmp/pspdev" PSPDEV="/usr/local/pspdev" ./configure --prefix=/usr/local/pspdev --target=psp
    make || return 1
    make DESTDIR=$startdir/pkg install
    I know, using newlib as pkgname is bad, but later I'll change it to psp-newlib and I'll replace the $pkgname's with newlib (I hope this idea isn't too bad)
    One last thing: psp-binutils and psp-gcc are installed in "/usr/local/pspdev"
    I hope you can help me
    thanks, and have a nice day
    XazZ

    After a long break I decided to work on the PKGBUILD again.
    Now I got two PKGBUILD's: one for the psptoolchain and one for pspsdk (pspsdk gets updated very often, so I decided to create an extra PKGBUILD).
    I'm not sure if my PKGBUILD's fit the PKGBUILD-standard
    First thing before I post my PKGBUILD's: I'm not finished with adding all required fields (as license and so on)!
    Here comes the one for psptoolchain:
    pkgname=psptoolchain
    pkgver=2211
    pkgrel=1
    pkgdesc="A collection of tools to create executables for the Sony PSP"
    url="http://ps2dev.org/psp/Tools/Toolchain/"
    depends=('subversion' 'texinfo')
    makedepends=()
    license=('GPL')
    source=(ftp://ftp.gnu.org/pub/gnu/binutils/binutils-2.16.1.tar.bz2 ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.0.2/gcc-4.0.2.tar.bz2 ftp://sources.redhat.com/pub/newlib/newlib-1.15.0.tar.gz)
    md5sums=('6a9d529efb285071dad10e1f3d2b2967'
    'a659b8388cac9db2b13e056e574ceeb0'
    '4020004b1b7a56ca4cf7f6d35b40a4cb')
    sha1sums=('5c80fd5657da47efc16a63fdd93ef7395319fbbf'
    'f1b714c6398393d8f7f4ad5be933b462a95b075d'
    'f6860b36e48fb831a30bab491230bbc7ce2669a2')
    arch=('i686')
    _svntrunk=svn://svn.pspdev.org/psp/trunk/psptoolchain
    _svnmod=psptoolchain
    _svntrunk1=svn://svn.pspdev.org/psp/trunk/pspsdk
    _svnmod1=pspsdk
    build() {
    cd $startdir/src
    svn co $_svntrunk $_svnmod
    cd psptoolchain
    cp binutils-2.16.1.patch $startdir/src/binutils-2.16.1/
    cp gcc-4.0.2.patch $startdir/src/gcc-4.0.2/
    cp newlib-1.15.0.patch $startdir/src/newlib-1.15.0
    export PSPDEV="$startdir/pkg/usr/local/pspdev"
    export PATH="$PATH:$PSPDEV/bin"
    msg "patching and building binutils..."
    cd $startdir/src/binutils-2.16.1
    cat binutils-2.16.1.patch | patch -p1
    ./configure --prefix=/usr/local/pspdev --target=psp --enable-install-libbfd
    make clean || return 1
    make || return 1
    make DESTDIR=$startdir/pkg install
    msg "building and patching binutils finished"
    msg ""
    msg "patching and building gcc..."
    cd $startdir/src/gcc-4.0.2
    cat gcc-4.0.2.patch | patch -p1
    mkdir objdir
    cd $startdir/src/gcc-4.0.2/objdir
    ../configure --prefix=$startdir/pkg/usr/local/pspdev --target=psp --enable-languages="c" --with-newlib --without-headers
    make || return 1
    make DESTDIR=/ install
    msg "building and patching gcc finished"
    msg ""
    msg "building pspsdk-headers - we'll only need them temporary"
    cd $startdir/src/
    svn co $_svntrunk1 $_svnmod1
    cd $_svnmod1/
    ./bootstrap
    ./configure --prefix=/usr/local/pspdev -with-pspdev=/usr/local/pspdev
    make clean || return 1
    make DESTDIR=$startdir/pkg install-data
    msg "building pspsdk-headers finished"
    msg ""
    msg "patching and building newlib-psp"
    cd $startdir/src/newlib-1.15.0
    cat newlib-1.15.0.patch | patch -p1
    ./configure --prefix=$startdir/pkg/usr/local/pspdev --target=psp
    make || return 1
    make DESTDIR=/ install
    msg "building newlib-psp finished"
    msg ""
    msg "building gcc-c++"
    cd $startdir/src/gcc-4.0.2
    mkdir build-psp-c++
    cd $startdir/src/gcc-4.0.2/build-psp-c++
    ../configure --prefix=$startdir/pkg/usr/local/pspdev --target=psp --enable-languages="c,c++" --with-newlib --enable-cxx-flags="-G0"
    make clean || return 1
    make CFLAGS_FOR_TARGET="-G0"
    make || return 1
    make DESTDIR=/ install
    msg "building gcc-c++ finished"
    msg ""
    msg "removing unnecessary code"
    cd $startdir/pkg/usr/local/pspdev/psp
    rm -rf sdk
    msg "Now you need to build and install pspsdk!"
    And here the one for pspsdk:
    pkgname=pspsdk
    pkgver=2209
    pkgrel=1
    pkgdesc="A collection of Open Source tools and libraries written for the Sony Playstation Portable (PSP)."
    url="http://ps2dev.org/psp/Tools/Toolchain/"
    depends=('psptoolchain')
    makedepends=()
    arch=('i686')
    license="custom"
    _svntrunk=svn://svn.pspdev.org/psp/trunk/pspsdk
    _svnmod=pspsdk
    build() {
    export PSPDEV="/usr/local/pspdev"
    export PATH="$PATH:$PSPDEV/bin"
    cd $startdir/src
    svn co $_svntrunk $_svnmod
    cd $_svnmod/
    ./bootstrap
    ./configure --prefix=/usr/local/pspdev -with-pspdev=/usr/local/pspdev
    make clean || return 1
    make DESTDIR=$startdir/pkg install-data
    make clean || return 1
    ./configure --prefix=$startdir/pkg/usr/local/pspdev -with-pspdev=/usr/local/pspdev
    make || return 1
    make DESTDIR=$startdir/pkg install
    Some explanation: I've used this one very often: --prefix=$startdir/pkg/usr/local/pspdev
    Explanation: When I wanted to create only one PKGBUILD for the psptoolchain, some dependences were in $startdir/pkg. If you take  --prefix=/usr/local/pspdev he won't get some depencies (mostly header files), which means I had to create single PKGBUILD's for every part of the psptoolchain (that would be 6 single parts).
    Those --prefix-changes don't stop my psp environment from working! (tested it myself - I comiled almos all sample apps which were included in the pspsdk - and all compiled well)
    I hope we can find a better solution than mine.
    Thanks in advance
    XazZ

  • Urgent help needed to build a script for like mapping

    ll
    Edited by: Tom&amp;amp;amp;Mah on Jul 17, 2012 7:13 AM

    Hello,
    I don't have a VI for you, but I'll try to give you some ideas.
    Of course, first you will need to use DAQ VIs to acquire the data. You will probably have a loop with one scan process per loop iteration. In that case, just put a chart inside the loop and the new data will be added to the chart. The data will be plotted starting at the last scanned x-axis point, and the plot line will continue from the previous y point. If the new scan doesn't start until the user presses a button on the front panel, then you should use event driven programming. I have included a simple example that will plot new data after the user hits a Boolean. The new data is added to the chart.
    You might want to search on google for LabVIEW and xps to see if someone else ha
    s implemented some VI to use with xps.
    Zvezdana S.
    Attachments:
    Chart.vi ‏28 KB

  • Registry startup script for computer-based proxy configuration

    I am attempting to deploy computer-based proxy server settings via importing a .reg file to user PCs as a startup script. It has appeared to work on some PCs but not on others. We have a mix of Windows XP Professional x86 and Windows 7 Professional x64 PCs
    in our domain.
    I am not sure whether to use "reg import" or "regedit /s" in my batch script.
    Before trying the batch script method, using "Computer Configuration > Preferences > Registry" settings did not work.
    I have created a GPO, applied it to an OU containing computers and used the following settings:
    Computer Configuration > Policies > Windows Settings > Scripts > Startup
    Batch Script: regedit /s \\FQDN\netlogon\wmproxy.reg
    Registry File:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings]
    "ProxyEnable"=dword:00000001
    "MigrateProxy"=dword:00000001
    "ProxyOverride"="<local>"
    "ProxyServer"="proxy.FQDN:8080"
    Computer Configuration > Administrative Templates > Windows Components/Internet Explorer
    Disable changing proxy settings = Enabled
    Make proxy settings per-machine (rather than per-user) = Enabled
    As at the beginning of my post, the settings deploy to some PCs but not all and I have yet to see it work on the Windows 7 PCs. Am I attempting computer-based proxy settings the wrong way, or am I missing something with how I am currently trying to deploy
    it?
    Thanks all!

    Hi,
    You mentioned you have tried to configure the computer-based proxy settings via GPP but it didn’t work. Before going further, would you please let me know how did you configure the settings?
    In order to narrow down the cause of the issue, I suggest we’d better collect the following information.
    GPMC.log
    ==================
    a. On domain controller, click Start ->Run, type GPMC.MSC, it will load the GPMC console.
    b. Right click on "Group Policy Result" and choose wizard to generate a report for the problematic computer and user account (please place appropriately). (Choose computer and select the proper
    user in the wizard)
    c. Right click 
    the resulting group policy result and click the "Save Report…" => save report to save the report to a HTML file.
    Once we get the GPMC.log, please check the detailed report logged in it.
    You said you have created a startup script to edit the registry key to configure the proxy setting of the computer but it worked on only some of the computers in the domain. Have you tried
    to run the script on the problematic computer manually to see if it works? If it still fails to run, it could be related to the script issue, then we’d better ask in the script forum.
    The Official Scripting Guys Forum!
    http://social.technet.microsoft.com/Forums/en-US/ITCG/threads
    Regards,
    Andy

  • A simple script for you, a giant script for me-

    I like scripts very much but scripting does not seems to like me! Can anyone help me and write a script for me? What I need is this:
    1. Ungroup everything in a spread
    2. A loop that goes through every text frame in the spread and, at the end of the text contained in each of those frames inserts a blank paragraph. (The frames contains text and inline graphics)
    This may seems strange but is what I need.
    Best regards and thank you in advance
    Maria

    I like scripts very much but scripting does not seems to like me! Can anyone help me and write a script for me? What I need is this:
    It's much easier for you to show us what you have and then we'll fix it for you or tell you what is wrong. Then you'll learn something to!
    1. Ungroup everything in a spread 
    This one's easy -- unless you're worried about groups inside groups?
    app.activeWindow.activeSpread.groups.everyItem().ungroup()
    If it's groups all-the-way-down, on the other hand, well, it might be more than one line...

  • Script for batch delet redundant layer

    I have thousands files in the different folders, each file has same layer named “Job Info”. Can someone help me to write a script for del this layer folder by folder?
    I expected the script tells me that I have to select a folder, then it can automatically open the files, del “job info” layer then save file, rewrite, close file

    Hi Ashram,
    Sorry, I misunderstood your question. Please try the below.
    var folder = Folder.selectDialog ("Select the root folder");
    var myfiles = [];
    var _layers = ["test1", "test2", "test3"];
    getsubfolderfiles(folder);
    for(var i =0;i<myfiles.length;i++)
            var doc = app.open(myfiles[i],false);
            for(var j=0;j<_layers.length;j++)
                try
                    app.activeDocument.layers.add({name:_layers[j]})
                catch(e){}
            doc.save();
            doc.close();
    function getsubfolderfiles(folder)
        var filelist = folder.getFiles();
        for(var i =0;i<filelist.length;i++)
            if(filelist[i] instanceof Folder)
                getsubfolderfiles (filelist[i]);
            else if(filelist[i] instanceof File)
                if(filelist[i].name.indexOf(".indd") > -1){
                    myfiles.push(filelist[i]);
    Hi HarveyLiu,
    Try this,
    var folder = Folder.selectDialog ("Select the root folder");
    var myfiles = [];
    getsubfolderfiles(folder);
    for(var i =0;i<myfiles.length;i++)
            var doc = app.open(myfiles[i],false);
            try{
                var _layer = doc.layers.item("Job Info");
                _layer.remove();
                var link, image, frame,
                links = doc.links, counter = 0;
                for (var i = links.length-1; i >= 0; i--) {
                    if (links[i].status == LinkStatus.LINK_MISSING) {
                        try {
                            link = links[i];
                            image = link.parent;
                            frame = image.parent;
                            frame.remove();
                            counter++;
                        catch (err) {
                            $.writeln(i + " - " + err);
            catch(e){}
            doc.save();
            doc.close();
    function getsubfolderfiles(folder)
        var filelist = folder.getFiles();
        for(var i =0;i<filelist.length;i++)
            if(filelist[i] instanceof Folder)
                getsubfolderfiles (filelist[i]);
            else if(filelist[i] instanceof File)
                if(filelist[i].name.indexOf(".indd") > -1){
                    myfiles.push(filelist[i]);
    Regards,
    Chinna

Maybe you are looking for

  • HP Pavilion dv6-3061ee PC Power Adaptor

    I am searching for Power Supply Adapter and Battery replacement, does anyone know original model number of these parts. Unfortunately i loss both .  

  • File Vault won't stop.  Makes loud noise

    When I set up my IMAC G-5 originally, I selected to us File Vault, since I didn't know any better. I haven't opted to have space recaptured for a long time. Last night when asked, I said yes. After an hour of seeing the small circle turning on the li

  • Design Decision - Adapter Class/Interface

    I have person class and I have a project class and I think I want to make the project class an adapter class... does this make sense ? I can make it an interface but I dont want the person who will implement it to have to implement all the methods in

  • AE Suddenly Crashes on Mac

    Have been working great until yesterday when it suddenly stopped working. Have tried to      *Clean Install AE      *Trash Pref File      *Update to 11.0.2 Still crashing... Process:         After Effects [6934] Path:            /Applications/Adobe A

  • Cisco NSS 322 Bom

    HI i want to order cisco NSS 322,when i was going to order it through the cisco dynamic configuration tool it has no any option to choose the hard disk drivers & power adapters ,so please tell me how i order this NSS 322 with power adapter and hard d