Comments (1)
I wouldn't change the init.d/s99custom. If you look in that file it calls to the shared mount to execute a custom.sh file. You make your changes there.
Here's a fully working install file. Just paste the below into a new batocera_install.sh file. Then SFTP it to the box, make it executable and then run it. Everything works as expected.
#!/bin/bash
#Step 1 make /boot writable---------------------------------
sleep 2s
mount -o remount, rw /boot
mount -o remount, rw /
#Step 2) enable UART and system.power.switch----------------
File=/boot/config.txt
if grep -q "enable_uart=1" "$File";
then
echo "UART already enabled. Doing nothing."
else
echo "enable_uart=1" >> $File
echo "UART enabled."
fi
sleep 2s
if grep -q "^system.power.switch=PIN356ONOFFRESET*" "/recalbox/share/system/recalbox.conf";
then
echo "PIN356ONOFFRESET configuration already enabled."
else
echo "system.power.switch=PIN356ONOFFRESET" >> /recalbox/share/system/recalbox.conf
echo "PIN356ONOFFRESET configuration enabled."
fi
#-----------------------------------------------------------
#Step 3) Download Python script-----------------------------
mkdir /recalbox/share/scripts;
sleep 2s
script=/recalbox/share/scripts/SafeShutdown.py
if [ -e $script ];
then
echo "Script SafeShutdown.py already exists. Doing nothing."
else
wget --no-check-certificate -O $script "https://raw.githubusercontent.com/RetroFlag/retroflag-picase/master/recalbox_SafeShutdown.py"
fi
#-----------------------------------------------------------
sleep 2s
#Step 4) Enable Python script to run on start up------------
DIR=/recalbox/share/system/custom.sh
if grep -q "python $script &" "custom.sh";
then
if [ -x $DIR];
then
echo "Executable S99RetroFlag($DIR) already configured. Doing nothing."
else
chmod +x $DIR
fi
else
echo "python $script &" >> $DIR
chmod +x $DIR
echo "Executable S99RetroFlag($DIR) configured."
fi
#-----------------------------------------------------------
#Step 5) Reboot to apply changes----------------------------
echo "RetroFlag Pi Case Switch installation done. Will now reboot after 3 seconds."
sleep 3
shutdown -r now
#-----------------------------------------------------------
from retroflag-picase.
Related Issues (20)
- A physical pull up resistor is fitted on this channel! HOT 4
- Nespi 4 power led not working when booting from ssd HOT 1
- LED not working on Nespi4 case with safe shutdown switch to ON HOT 4
- When insert USB device, Raspberry reboot
- Safe Shutdown script don't work - Stucked on Stopping Restore / save the current clock
- Raspberry Pi 4 (Ubuntu 20.04) rebooting instead of shutting down when POWER button is pressed.
- Skript wont install HOT 13
- safe shutdown script doesn't power down rasp4 with recalbox
- Raspberry Pi 4 (Ubuntu 21.04) installation doesn't handle lack of /etc/rc.local
- It is possible install script via SSH on Recalbox? HOT 4
- CoreElec + Fan & SafeShutdown - Not a thing?
- Safe-shutdown Not working HOT 2
- Raspbian OS HOT 1
- Home Assistant HOT 2
- Can we have a script for LibreELEC? HOT 1
- Clarifications on GPI case 2W possibly needed
- It constantly reboots HOT 1
- Failed to read 'RetroFlag_pw_io.dtbo'
- Clarification on power button functionality HOT 2
- Raspberry Pi OS 12 bookworm kernel 6.1.69
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from retroflag-picase.