On a sunny day (Thu, 29 Mar 2018 15:42:59 +0100) it happened mm0fmf
wrote in :
>On 29/03/2018 15:11, The Natural Philosopher wrote:
>> systemd has been designed by a cunt to prevent that from being an easy
>> answer.
>
>Don't hold back, tell us exactly what you think! :-)
>
>
>
>/me steps back and tries to suppress enthusiastic laughter
Apart from the media show that could happen,
this is how *I* do things on my pi :
In /etc/rc.local, added a call to /usr/local/sbin/pantel-init :
# In order to enable or disable this script just change the execution bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
# do this before starting X
/usr/local/sbin/pantel-init
# starts X
su -l pi -c startx
exit 0
---------------------
So it calls pantel-init,
/usr/local/sbin/pantel-init contains things like (edited for example):
echo "This is /usr/local/sbin/pantel-init"
#echo "stopping apache webserver"
#/usr/sbin/apachectl stop
echo "stopping ntpd"
/usr/bin/killall -KILL ntpd
#echo "restarting ntpd"
#/usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 102:104
#echo "executing ifconfig eth0 192.168.178.73 up"
#ifconfig eth0 192.168.178.73 up
ifconfig wlan0 192.168.178.74
killall -KILL dnsmasq
/usr/sbin/ntpdate -t 1 132.163.4.103
# If xauth prevents a reboot if powerdown was done remotely then edit startx
and set auth to 0
dhcpd
exit 0
...
----------------------------------
The rest in in ~/.xinitrc :
xset m 3/3 4 # For Logitech wireless mouse
xset s off # don't activate screensaver
xset -dpms # disable DPMS (Energy Star) features.
xset s noblank # don't blank the video device
# start xgpspc
xgpspc -7 waddenzee_west_stroming,53.5,4.625,52.9167,6,0 -b /root/waypoints.1
-d 3000 -s -q -{ 160428_DNZ_002a_markeringen_drijvend.csv -6 800x480 -_
'192.168.178.77 7777' -j 2 -D 0,1 -+ -^
# end xgpspc
# file manager
xfm -appmgr -geometry 800x400+0+0 &
-----------------------------------------------------------
The xgpspc application in this case runs in the foreground, and takes control,
and runs in X..
the file manager (I use xfm) never executes...
This method works on all Linux versions I know about, my big PC with Slackware
etc,
Is is wrong, is it right? Who cares.
Linux system has been corrupted by bandits ever since rathead had go at it.
But it works.
For a data-logger you would not start X I suppose.
If it really needs to be so fast that you need a ramdisk,
then I would think why not write a device driver?
Else Linux will cache everything anyways.
And.. Linux is NOT a real time system,
for that I program micros (Microchip PICs).
Even faster? FPGA, there is a addon FPGA board for raspi.
But so far I have not run out of execution speed with so much data logging,
AIS logging, temperature, pressure, humidity, CO level,
on top of a complicated navigation display, so what is it OP wants to log, and
how fast?
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|