-
I tried 3 methods to run a custom script at boot time but none work
Hi
I'm trying to run my own custom shell script at boot time, but without success.
I HAVE searched the forums but can't find an answer to my particular problem.
(I've got Knoppix distro 7.0.2, ver 3.3.7, on hard disk, on Acer Aspire 5750 laptop.)
My simple script is as follows:
Code:
#!/bin/sh
# This script is to run programs and make settings that I want to effect after
# I've just booted. It would be better if I could get this script to run
# during the boot.
# Cause the script command lines themselves to be DISPLAYED.
set -x
# Restore the volume settings that I stored with "alsamixer store".
alsactl restore
# cfg80211 and wl are kernel modules related to operating the wifi on my laptop.
# wl enables my particular Broadcom wifi card BCM43227 to work.
# The following commands ADD these modules to the kernel. "modprobe wl" makes
# the wifi LED come on.
sudo modprobe cfg80211
sudo modprobe wl
The script runs OK when I manually run it at a terminal prompt, after full
bootup.
To get it to run at boot time, I've tried placing the script in the following places (I made the script executable, with owner root):
1. /KNOPPIX/knoppix.sh
2. /etc/profile.d/JGstartup.sh
3. /etc/rc5.d/S99JGstartup (a symlink to /etc/init.d/JGstartup)
But it doesn't appear to execute in any of these cases. I would know if it had
executed by seeing the laptop wifi light coming on (last instruction in
script). But the light doesn't come on (as it dutifully does when i run the
script from a terminal, after bootup).
Could a kind person tell me what's wrong please. Thanks. John.
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

Genuine Cisco SFP-10G-SR 0-2415-03 10 Gigabit Transceiver
$5.40

Cisco SFP-10G-LR-S Reset & Tested Lot of 2
$32.99

NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping*
$24.00

Ubiquiti Unifi USW PRO AGGREGATION 28x10Gbe 4x25Gbe QSFP28 Layer 3 Switch
$700.00

SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT
$7.99

Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA
$28.94

HP 560SFP+ 10GB 2-port PCIe NIC Ethernet ADAPTER 669279-001 w/ (2) 10GB SFP+
$16.99

Ruckus ICX7550-24F-E2, 24 ports of 1/10GbE SFP+ & 2 ports of 40/100GbE QSFP28
$8995.00

Cisco Acacia DP04QSDD-E25-840 400G QSFP-DD Coherent DCO Transceiver Module
$699.99

Ubiquiti Unifi USW PRO AGGREGATION 28x10Gbe 4x25Gbe QSFP28 Layer 3 Switch
$750.00