Is it possible to trigger specific cheatcodes or load specific modules based on the detected hardware?
I use Porteus as a Live OS on multiple systems and some of the blacklists in my modprobe config are contradictory between the various systems. Also certain optimizations for HiDPI displays will look ridiculous on regular displays. It would be ideal to trigger these changes only if compatible hardware is detected.
Thanks.
Hardware specific cheatcode/modules
-
- Contributor
- Posts: 676
- Joined: 26 Jun 2013, 14:03
- Distribution: x64 Openbox
- Location: Russia is causing the immense damage to humanity
- Contact:
Re: Hardware specific cheatcode/modules
You can try add test to your /etc/rc.d/rc.local
For chosen hardware execute in terminal
dmidecode -t 1 | grep "Serial Number"
next copy your Serial Number, replace mynum below with copied Serial Number, and paste all to /etc/rc.d/rc.local:
For chosen hardware execute in terminal
dmidecode -t 1 | grep "Serial Number"
next copy your Serial Number, replace mynum below with copied Serial Number, and paste all to /etc/rc.d/rc.local:
Code: Select all
check1=`dmidecode -t 1 | grep "Serial Number"`
[[ $check1 == *"mynum"* ]] && activate /your/path
You have mind and feelings. Be wise and clever.
Re: Hardware specific cheatcode/modules
Thanks, but it doesn't seem to work when blacklisting modules. Here is my code:tome wrote:You can try add test to your /etc/rc.d/rc.local
For chosen hardware execute in terminal
dmidecode -t 1 | grep "Serial Number"
next copy your Serial Number, replace mynum below with copied Serial Number, and paste all to /etc/rc.d/rc.local:
Code: Select all
check1=`dmidecode -t 1 | grep "Serial Number"` [[ $check1 == *"mynum"* ]] && activate /your/path
Code: Select all
check1=`lspci | grep -i broad`
[[ $check1 == *"Broadcom Corporation BCM4350 802.11ac Wireless Network Adapter (rev 08)"* ]] && echo "blacklist wl" > /etc/modprobe.d/b43_blacklist.conf
Is it possible that the rc.local scripts are run much later than the rootcopy stage? That might explain why creating a static blacklist file in rootcopy works, but a dynamically generated file via rc.local doesn't.
-
- Full of knowledge
- Posts: 2564
- Joined: 25 Jun 2014, 15:21
- Distribution: 3.2.2 Cinnamon & KDE5
- Location: London
Re: Hardware specific cheatcode/modules
Believe that to be the case. If look at /var/log/porteus-livedbg note rootcopy type mentioned there, so processed at initrd stage AFAIK.markdown wrote:Is it possible that the rc.local scripts are run much later than the rootcopy stage?
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB
-
- Contributor
- Posts: 676
- Joined: 26 Jun 2013, 14:03
- Distribution: x64 Openbox
- Location: Russia is causing the immense damage to humanity
- Contact:
Re: Hardware specific cheatcode/modules
It is always.Is it possible that the rc.local scripts are run much later than the rootcopy stage?
Maybe instead of "echo "blacklist wl" > /etc/modprobe.d/b43_blacklist.conf" try "modprobe -r wl"
You have mind and feelings. Be wise and clever.