Here's a small sample of what I tried that doesn't work
Here is the script that works from the command line but not when called by OSCLI event though another script worked the same both ways. The sudo is just because I was testing copying into the /boot directory from the command line.
Code: Select all
PRINT "Start" INPUT k$ REM works - just to check if everything OK REM OSCLI "ldattach " + "-1 -8 -n -s 9600 0 /dev/serial0 " + ";" REM INPUT k$ REM works - Script to kill ldattach process - just to check if everything OK REM OSCLI "*/home/pi/software/frag.sh" REM INPUT k$ REM no work SYNTAX ERROR REM OSCLI "cp """+/home/pi/software/lcd0.sh+""" """+/home/pi/software/lcd0cp.txt+"""" REM INPUT k$ REM works but won't copy into /boot directory REM *COPY /home/pi/software/lcd0.sh /home/pi/software/clcd0cp.txt REM INPUT k$ REM no work BAD COMMAND REM OSCLI "cp /home/pi/software/lcd0.sh /home/pi/software/lcd0cp.txt" REM INPUT k$ REM no work BAD COMMAND - script works fine from command line REM OSCLI "*/home/pi/software/lcd0.sh" REM INPUT k$ REM no work BAD COMMAND - script works fine from command line REM OSCLI "sh /home/pi/software/lcd0.sh" REM INPUT k$ REM no work BAD COMMAND - script works from command line REM *RUN /home/pi/software/lcd0.sh REM INPUT k$ REM changes to specified director and creates directory "new" then BAD COMMAND OSCLI "cd /home/pi/software" OSCLI "mkdir new" OSCLI "sh lcd0.sh" END
I have tried setting permission many different ways and that doesn't seem to have any effect on this problem. Anyone have an example of what works.
Code: Select all
#!/bin/bash sudo cp /boot/configHDMI.txt /home/pi/software/configbak.txt echo "lcd0"
Tried on 2 systems CM3+ with stretch version 9 4.19.57-v7 and RPi 3B+ with stretch version 9 4.9.80-v7
As you may gather from the comment on example 4 I am interested in a script to modify /boot/config.txt however I can't get BBCSDL OSCLI to copy anything anywhere so that would be a start.