View Single Post
Old 03-04-2024, 11:39 AM   #38
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,894
Karma: 12981955
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Quote:
Originally Posted by nhedgehog View Post
No it wasn't, but testing this on another unrooted device with a more recent FW tells me, that neither:

cp /mnt/secure/device.cfg /mnt/ext1

nor

/var/run/device.cfg >> /mnt/ext1/device.cfg

is working! (permission denied)

PS @neil_swann80: Thanks for your contributions to the community, it is really appreciated.
Did you definitely test:

echo /var/run/device.cfg >> /mnt/ext1/device.cfg

EDIT: that would just write the filepath to the new file!
The actual script copies the file from /var/run to the user area, then reads it with the cat command.

So a better test would be: cp /var/run/device.cfg /mnt/ext1/device.cfg

or better still:
Code:
echo have_opds=1 > /mnt/ext1/device.cfg
IFS=''; cat "/var/run/device.cfg" |
while read data; do
	if echo "$data" | grep -q "have_opds"; then :
    else echo "${data}" >> "/mnt/ext1/device.cfg"; fi
done

Last edited by neil_swann80; 03-04-2024 at 11:59 AM.
neil_swann80 is offline   Reply With Quote