-
Run a shell script after booting
-
Senior Member
registered user
Re: Run a shell script after booting

Originally Posted by
mpweber77
I am creating a text-mode (init level 3) Knoppix system and I want to execute a shell script automatically when the CD boots. What I have tried is an init script, but since the shell script doesn't ever exit, the inits never finish.
Have you tried adding your script to /etc/inittab? For example, to have "/usr/bin/top" running on virtual console 1 in runlevel 3, remove this single line from /etc/inittab:
Code:
1:12345:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1
and replace it with these two:
Code:
1:1245:respawn:/bin/bash -login >/dev/tty1 2>&1 </dev/tty1
1a:3:respawn:/usr/bin/top >/dev/tty1 2>&1 </dev/tty1
Replace your script for "/usr/bin/top" and it should work.
Let us know how things go.
Regards,
- Robert
http://www.cwelug.org/
Similar Threads
-
By ecliu in forum General Support
Replies: 0
Last Post: 02-20-2009, 11:14 AM
-
By migs_sison in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 02-24-2006, 01:21 AM
-
By splittik in forum General Support
Replies: 1
Last Post: 03-22-2005, 07:38 AM
-
By niXnoob in forum General Support
Replies: 3
Last Post: 10-06-2004, 04:56 AM
-
By ktheking in forum General Support
Replies: 4
Last Post: 06-29-2003, 12:34 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
-
Forum Rules

KNOPPIX 9.1 Linux Install & Live DVD 32bit & 64bit
$19.99

Windows XP, Vista, 8.1, Linux Knoppix, Office XP, (6 CDS)
$10.00

Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive
$5.99

KNOPPIX USB DVD OS , BEST OF ALL HIGHLY RECOMENDED
$11.99

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 16G USB Stick
$20.85

VINTAGE SOFTWARE | KNOPPIX STD 0.1 (SECURITY TOOLS DISTRIBUTION)
$7.57

Knoppix NSM 1.2
$8.00

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 32G USB Stick
$21.42

Hamshack Live DVD-ROM
$7.00

Knoppix 5.0.1 ULTRA RARE Linux DVD - Linux Pro Extra August 2006
$33.98