Abschaltung eines SD-Karten-Lesers via Script

beisser

Active Member
Feb 21, 2023
154
43
28
Moin,

in meinem Mini-PC gibt es einen SD-Karten-Leser, der, wenn er aktiv ist immer ein IO-Delay von genau 1% produziert.
Man kann das abstellen indem man echo 1 > /sys/block/sdc/device/delete ausführt.
Anschliessend ist das Delay bei 0.0x%.

Allerdings ist es nervig, das jedes mal nach einem Reboot eingeben zu müssen.
Ich bin mir sicher, dass man das irgendwie in ein Startup-Script einbauen kann.
Leider sind meine Kenntnisse im entsprechenden Bereich nicht sehr ausgeprägt.
Wo würdet ihr diesen Befehl einbauen, damit er bei jedem Bootvorgang ausgeführt wird?
 
Oder einmal die Zeile
@reboot root /usr/bin/echo 1 > /sys/block/sdc/device/delete 2>&1 in die /etc/crontab schreiben. Führt den Befehl dann auch genau einmal nach jedem Reboot als root aus. Und etwas leichter, als wenn man sich da erst in Systemd Timer und Serivces einarbeiten muss, die ja schon etwas komplexer als Cron sind.
 
Last edited:
  • Like
Reactions: beisser

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!