Results 1 to 9 of 9

Thread: Howto start progams on boot?

  1. #1
    Junior Member registered user
    Join Date
    Feb 2004
    Posts
    22

    Howto start progams on boot?

    What is the best way to start programs when Knoppix boots?

    For example, I'd like to have a script that sets up my soft links which are not saved by Save KNOPPIX configuration.

    I'd also like to start my firewall script.

    Would it be appropriate to put a script in /etc/rcS.d?

    I usually use Slackware which has a user script
    in /etc/rc.d/rc.local where I do this kind of stuff.

    I'd like to know "the Knoppix" way.

    Pelican

  2. #2
    Junior Member registered user
    Join Date
    Feb 2004
    Posts
    22
    After some fiddling and research I figured this out for myself.

    I've created a file /etc/rc5.d/S99start which does the following
    just before KDE loads:
    runs my firewall
    creates sub-directories in /mnt needed for nfs and smb mounts.
    These are not normally saved by saveconfig.
    creates some soft links I need including localzone and a link to
    S99start in /etc/bin which is where I keep my personal bin files.
    Soft links are also not saved by saveconfig.

    I called it S99 to make it load last like an rc.local in bsd style inits.
    Actually it's the only file in the /etc/rc5.d directory

    Pelican

  3. #3
    Member registered user
    Join Date
    Jul 2003
    Posts
    96
    Saw yr post...thanks.

    But I'm wondering when I create the soft link for two processes, mysql and apache, under rc3.

    How do I know what number to assign them?

    thanks

  4. #4
    Junior Member registered user
    Join Date
    Feb 2004
    Posts
    22
    I don't know how to create a soft link for a _process_ or if it's possible.
    AFAIK, process numbers are assigned by the system when you
    start a program.

    The syntax to create a soft link is:
    ln -s /path/name_of_program_to_run /path/name_of_link

    So to create the link to my initialization file in rc5.d:
    ln -s /etc/rc5.d/S99start.lba /etc/bin/S99start.lba
    is written just like that in the file S99start.lba.

    This rather cumbersome procedure is caused by the fact that
    saveconfig will not save soft links.
    I DK about hard links, never use them.

    In your case it could be
    ln -s /path/apache /path/name_of_soft_link

    Pelican

  5. #5
    Member registered user
    Join Date
    Jul 2003
    Posts
    96
    I guess that really doesn't answer my question.

    I know how to start stuff up like mysql and apache.

    I understand creating soft links, but how do I link the services that I want to run to init.d to rc3.d?

  6. #6
    Senior Member registered user
    Join Date
    Dec 2003
    Location
    Salt Lake City, UT, U.S.A.
    Posts
    1,338
    JockVSJock,

    I seem to use the SysV editor - its a GUI, and allows setting start/stops from specific levels.

    I'm sorry, I guess I am not so "Linux" savvy as others, and do everything from a shell, like, I guess, I'm supposed to do, but, I've come from a long standing years in the Windows World, and tend to use a GUI, whenever present.

    Not sure if SysV modifies what you are wanting to do, in my situations, it did, or by leaving something running when I logged out, it would come back when I restarted - like my Audio Mixer.

    Hope this helps,
    Cuddles

  7. #7
    Member registered user
    Join Date
    Jul 2003
    Posts
    96
    Quote Originally Posted by Cuddles
    JockVSJock,

    I seem to use the SysV editor - its a GUI, and allows setting start/stops from specific levels.

    I'm sorry, I guess I am not so "Linux" savvy as others, and do everything from a shell, like, I guess, I'm supposed to do, but, I've come from a long standing years in the Windows World, and tend to use a GUI, whenever present.

    Not sure if SysV modifies what you are wanting to do, in my situations, it did, or by leaving something running when I logged out, it would come back when I restarted - like my Audio Mixer.

    Hope this helps,
    Cuddles
    Cuddles, one thing I learned from Winjunk (Windows), if the GUI crashed, which has happened alot, and I got a command prompt, and I didn't know what the hell I was doing, then I WAS DEAD IN THE WATER.

    With Linux, it has forced me so many times to learn the command line, don't become a dummy with a GUI.

    So my question still goes unanswered.

  8. #8
    Senior Member registered user
    Join Date
    Jan 2004
    Location
    Paris, France
    Posts
    203

    I dont know the official way BUT

    I just create the script in init.d then create a hardlink with Snn_____
    in the rc3.d

    So if its called
    /etc/init.d/apache
    then create a hardlink
    deciding where you want it to start (i,e after networking for instance)
    S80apache
    i.e. like pelican said:

    ln -s /path/name_of_program_to_run /path/name_of_link
    where /path/name_of_program_to_run would be /etc/init.d/apache
    and /path/name_of_link would be /etc/rc3.d/S80apache

    However its good practice to ad this to all run levels where it should be running like 4 and 5 as well.
    Also the knp start X in RL2 - (its faster) so check whats already running and make sure nothing depends on apache thats already running in rc2.d

  9. #9
    Member registered user
    Join Date
    Jul 2003
    Posts
    96
    This command does the trick


    update-rc.d apache defaults

    or

    update-rc.d mysql defaults


    Easy as that....

    Thanks to the folks in knoppix.net for the help as always....

Similar Threads

  1. Newbie - howto boot with out x11
    By astranberg in forum Hardware & Booting
    Replies: 1
    Last Post: 05-10-2005, 04:15 AM
  2. Howto to Start Knoppix ISO with PXE from LAN?
    By tiny in forum Hardware & Booting
    Replies: 5
    Last Post: 03-28-2005, 12:20 AM
  3. Can anyone help out howto start login screen once system up?
    By jzhai in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 06-04-2004, 05:10 PM
  4. HOWTO? ssh start at boot-up
    By A. Jorge Garcia in forum General Support
    Replies: 4
    Last Post: 05-08-2004, 01:35 PM
  5. [HOWTO] How to boot a chroot directory ...
    By Fabianx in forum Ideas
    Replies: 2
    Last Post: 07-05-2003, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN

$115.00



OPNsense Firewall 8-Core Atom C3758 4GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN picture

OPNsense Firewall 8-Core Atom C3758 4GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN

$95.00



OPNsense Firewall 16-Core Atom C3958 16GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI picture

OPNsense Firewall 16-Core Atom C3958 16GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI

$195.00



Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet picture

Zero Trace Pen: All-in-one Tor Network Anonymous Drive + Cryptocurrency Wallet

$147.00



PfSense/OPNsense 14x1Gb, 8-Core, 8GB RAM, 80GB SSD, AES-NI, QAT (Lanner FW-7573) picture

PfSense/OPNsense 14x1Gb, 8-Core, 8GB RAM, 80GB SSD, AES-NI, QAT (Lanner FW-7573)

$149.00



Fortinet FortiGate 60F FG-60F UTM UTP License Until 2027 Network Security FW VPN picture

Fortinet FortiGate 60F FG-60F UTM UTP License Until 2027 Network Security FW VPN

$229.99



Sophos XG 125 Rev.3 Desktop Firewall 8x GbE 1x SFP Wiped - No Power Adapter picture

Sophos XG 125 Rev.3 Desktop Firewall 8x GbE 1x SFP Wiped - No Power Adapter

$74.99



Sophos XG 135w Rev.3 Wireless Firewall 8x GbE 1x SFP 802.11ac SFOS - Wiped picture

Sophos XG 135w Rev.3 Wireless Firewall 8x GbE 1x SFP 802.11ac SFOS - Wiped

$74.99



Check Point 1590 Firewall & w builtin WiFI and builtin LTE sim slot picture

Check Point 1590 Firewall & w builtin WiFI and builtin LTE sim slot

$95.99



SonicWall TZ280 Firewall 03-SSC-6933 Advanced Edition 3YR NEW SEALED picture

SonicWall TZ280 Firewall 03-SSC-6933 Advanced Edition 3YR NEW SEALED

$999.99