Jump to content

thinkliberty

Members
  • Posts

    94
  • Joined

  • Last visited

Posts posted by thinkliberty

  1. Use this as a template and place it in /etc/init.d Then use the services menu in the mandrake control center to run the script at runlevel 2, 3 , 4 and 5

    #!/sbin/runscript
    #
    # start stop script
    # /etc/init.d/custom-init-script
    
    depend() {
           need net
    }
    
    checkconfigstart() {
           if [ ! -e "/path/to/startscript.sh" ]; then
                   eerror "You need a script to run first"
                   eerror "make sure that you chmod +x the .sh"
                   return 1
           fi
    }
    
    checkconfigstop() {
           if [ ! -e "/path/to/startscript.sh" ]; then
                   eerror "You need a script to run first"
                   eerror "make sure that you chmod +x the .sh"
                   return 1
           fi
    }
    
    start() {
           checkconfigstart || return 1
           ebegin "put what your script does here IE: loading wireless card"
           /path/to/startscript.sh
           eend $?
    }
    
    stop() {
           checkconfigstop || return 1
           ebegin "put what your script does here IE: stoping wireless card"
           /path/to/stopscript.sh
           eend $?
    }

  2. Cheers - bit over my head but I think I get the gist. So does that script run at hibernate/resume too?

     

    No it will not run at hibernate resume. You would have to use and modify the hibernate scripts (usually it is in /usr/sbin/hibernate)at the begining for hibernate and at the end for resume. to run a script that will update your bookmarks.

     

    The hibernation stuff for linux can be found here:

    http://softwaresuspend.berlios.de/

  3. I guess we could call this resolved, but I'd still like to hear about the hibernate/resume scripting thing. I'm sure it could come in handy for other things, and will fulfil the title of the question. Any thoughts?

     

    You could use something like this... and then pick your runlevels to have it start and stop...

     

    #!/sbin/runscript
    #
    # start stop script
    # /etc/init.d/syncbooks
    
    depend() {
           need net
    }
    
    checkconfig() {
           if [ ! -e "/sbin/syncfirefoxbooksifneededscript.sh" ]; then
                   eerror "You need a script to run first"
                   eerror "make sure that you chmod +x the .sh"
                   return 1
           fi
    }
    
    start() {
           checkconfig || return 1
           ebegin "copying bookmarks if needed"
           /sbin/syncfirefoxbooksifneededscript.sh
           eend $?
    }
    
    stop() {
           ebegin "bookmarks syncing"
           /sbin/syncfirefoxbooks.sh
           eend $?
    }

  4. Install c-kermit and use a script like this

     

    You can download c-kermit from:.http://www.columbia.edu/kermit/ck80binaries.html

     

    #!/usr/bin/kermit +
    # script from
    # http://www.columbia.edu/kermit/ftpscripts.html
    
    while true {
       ftp open FTP.EXAMPLE.COM /user:<DA USER> /password:<DA PASSWORD>
       if fail exit 1 Can't reach host
       if not \v(ftp_loggedin) exit 1 FTP login failed
       ftp cd <NAME OF DIRECTORY TO UPLOAD FILES>
       if fail exit 1 Directory change failed
       while true {
           ftp put <NAME OF FILE 1>  
           ftp put <NAME OF FILE 2>
           ftp put <NAME OF FILE 3>
           ftp put /recursive <NAME OF DIRECTORY 1>/*
           ftp put /recursive <NAME OF DIRECTORY 2>/*
           if success goto done
           if not \v(ftp_connected) break
       }
       ftp bye  
    }
    :done
    exit

     

    Although I would use ssh via scp for uploading files. That way your scripts don't need a password in them and your password is not transmitted via plain text.

  5. Can you ping yourself from the linux machine?

     

    Does your linksys router support pinging in the admin screen? (the linksys router I have does) Can you ping your linux box from the router? If yes try using a live linux cd to boot your windows and ping your linux machine...

     

    If no check your /etc/hosts.deny (are you running portsentry? )

     

    If only windows can't ping it

    Are you using a firewall in windows? zonealarm, winxp built-in firewall thingy? turn it off.

     

    The next step after this would be to use ethereal to sniff the network if you still cannot ping the linux box...

  6. Place all the following files in the same directory/folder by themselves

    libxorg-x11-6.8.1-7.mdk10.1.thac.i586

    libxorg-x11-devel-6.8.1-7.mdk10.1.thac.i586

    xorg-x11-100dpi-fonts-6.8.1-7.mdk10.1.thac.i586

    xorg-x11-6.8.1-7.mdk10.1.thac.i586

    xorg-x11-75dpi-fonts-6.8.1-7.mdk10.1.thac.i586

    xorg-x11-Xnest-6.8.1-7.mdk10.1.thac.i586

    xorg-x11-server-6.8.1-7.mdk10.1.thac.i586

    xorg-x11-xfs-6.8.1-7.mdk10.1.thac.i586

     

    open the console in the directory/folder that these files are in and type

    rpm -Uvh *.rpm

     

    what errors do you get now?

  7. Your /etc/hosts file is messed up you need to modify it for the connection type you are using if you switch network connections...

     

    OR you to make sure that your hostname in

    /etc/hosts and /etc/rc.conf are the same....

     

    You also need to make sure that if you are using dhcp to get your ip address that it is not changing your hostname from something like loclhost.localdomain to something like myispnode.ipaddyfromisp.ispname.com KDE slows down when this happens....

  8. In my experience (mdk7-mdk10) I have always had more than 1 kernel (the mdk and vanilla kernels) and there were no slow downs or crashes of any kind because of this. (other than drivers loading from the wrong kernel. when moving from a new kernel to an old one like nvidia's)

     

     

    my experience is that most of these crashes are caused in mandrake only because there is more than one kernel present at a time. don't ask me why this is so, but my mandrake-box crashed several times, stalled or became extremely slow when i had more than one kernel in the box. the strange thing is that this did not happen with other systems.

     

    one hint: check your log-files. most times, it is a problem of services that are trying to get started and simply stall. so, as long as you can run the draktools, you should check the running/stopped services in detail and deavtivate/activate them if necessary.

  9. It looks like iptables is

     

    A) Not installed

     

    B) Not in your PATH

     

     

     

    Type as root 'updatedb' then 'slocate iptables' then 'set' to check if iptables is in a directory in your path. (it's normally in /sbin)

     

    Also make sure that iptables is running as a service..

  10. For a file name like:

    this is the name.iso

    you would use

    this\ is\ the\ name.iso

     

    the back slash lets you use a space...

     

    If fstab wont mount the file because the path has spaces... try using a symlink ln -s /path/to/file /mnt/symlinktofile.iso and try mounting the symlink via fstab. The other thing to do would be write a shell script to manually mount the drive and have it run at boot (look in /etc/init.d for samples on how to write this script)

     

    If you need help writing the script let me know what the path to the iso file is and I will write it for you.

×
×
  • Create New...