I ended up simply adding the sudo commands to the knoppix.sh script to resolve my issue.
However, if anyone knows where/how to insert a new shell script during remastering, I am still curious to know!
Thank you,
Brandon
For reasons mentioned in another topic:
http://knoppix.net/forum/viewtopic.p...886de5994fd572
I need to write a shell script. The script needs to simply perform the following command:
sudo ifdown eth0 && sudo ifup eth0
Can someone help me? I need to know how to write this script and where to place it to have it automatically run when the KNOPPIX OS is loaded on a remastered CD. I'm new to Linux, but it looks like I can create a new text file, name it SudoTest.sh and simply put the above text followed by 'exit' and it will work. So if I'm correct, all I need to know is where I need to place this SudoTest.sh file in order to have it auto-run at bootup. If I'm reading the remastering instructions properly, this script needs to be placed in the /mnt/hda5/knx/source/KNOPPIX/etc/rc5.d directory. Can someone confirm? Is it really that simple?
Thank you,
Brandon
I ended up simply adding the sudo commands to the knoppix.sh script to resolve my issue.
However, if anyone knows where/how to insert a new shell script during remastering, I am still curious to know!
Thank you,
Brandon
you were on the right track, but didn't quite understand how the rc?.d directories work - they are an old unix way of doing startup.
Knoppix is mostly setup by the knoppix-autoconfig, and not much is needed in the other runlevels like 5.
What you would want to do is place your SudoTest.sh script in /etc/init.d, then create a symlink in /etc/rc5.d of the form:
S##SudoTest where the ## is replaced by a two digit number that represents when in the startup sequence the script should run.
Make sure your script is executable ( chmod +x /etc/init.d/SudoTest.sh ),
There isn't much there on a stock knoppix as far as I recall (I'm working from a heavily changed version now, and don't have the original handy),
so you could safely use S50SudoTest. If there are other scripts, just make sure yours happens after the network is brought up the first time...
(prepend your source tree to the dirs above if not working in the chroot environment - /mnt/hda5/knx/source/KNOPPIX/ it looks like ...)

Dell PowerEdge VRTX 2.5"x25 Bay Blade Enclosure 4x1600W + 4X M640 (4X Blades)
$1599.99
Dell PowerEdge M630 Blade Server 2x Xeon E5-2680 v4, 2F3MP , 4GDP5 ,R10KJ ,JVFVR
$140.00
Dell PowerEdge M640 Blade Barebone Server Dell P/N: HHB006 Tested Working
$149.99
Dell PowerEdge M620 Blade Server 2x Xeon E5-2680v2 256GB DDR3 RAM NO HDD
$349.99
Datto S4P10 1U Blade Rack Server Intel Xeon D-2143IT 2.20GHz 48GB DDR4 4-Bay PSU
$197.76
Dell Poweredge C6400 24x 2.5’’ 2x 2400W 4x C6420 Nodes H330 | 2x SFP | 8x Trays
$799.99
Datto S3P6000 4x 3.5" 1U Blade Rack Server Intel Xeon D-1541 @2.10GHz 48GB DDR4
$154.76
NETAPP HCI NAF-1701 SuperMicro Server 4X BLADE H410C 8X GOLD 5120 4 NODE SERVER
$1499.97
Cisco UCS 5108 Blade Server Chassis Enclosure N20-C6508 4x PSU 8x Fans 2x Fabric
$174.99
Dell Poweredge VRTX 25Bay 2.5" 2x PERC 8, 2xCMC, I/O 1GB Pass Through, 4x PS
$578.08