Browse Source

crond autostart, Display_GSM update

Reinhard Russinger 4 years ago
parent
commit
6e754bcd31

+ 1 - 1
MakeBuildrootEnv.sh

@@ -4,7 +4,7 @@ cd ..
 rm -rf buildroot
 rm -rf buildroot
 git clone git://git.buildroot.net/buildroot
 git clone git://git.buildroot.net/buildroot
 cd buildroot
 cd buildroot
-#git checkout 63a20d5dfebe83e2b2bd683dc78ebdf787dff100 -b psgwrk
+###git checkout 63a20d5dfebe83e2b2bd683dc78ebdf787dff100 -b psgwrk
 git checkout c4d26992560875930866a627cc936da2f938401b -b psgwrk
 git checkout c4d26992560875930866a627cc936da2f938401b -b psgwrk
 #==== Patches
 #==== Patches
 for i in ../PSG/patches/*.patch
 for i in ../PSG/patches/*.patch

+ 42 - 0
board/PSG/iot2000/rootfs_overlay/etc/dhcpcd.conf

@@ -0,0 +1,42 @@
+# A sample configuration for dhcpcd.
+# See dhcpcd.conf(5) for details.
+
+# Allow users of this group to interact with dhcpcd via the control socket.
+#controlgroup wheel
+
+# Inform the DHCP server of our hostname for DDNS.
+hostname
+
+# Use the hardware address of the interface for the Client ID.
+#clientid
+# or
+# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
+# Some non-RFC compliant DHCP servers do not reply with this set.
+# In this case, comment out duid and enable clientid above.
+duid
+
+# Persist interface configuration when dhcpcd exits.
+persistent
+
+# Rapid commit support.
+# Safe to enable by default because it requires the equivalent option set
+# on the server to actually work.
+option rapid_commit
+
+# A list of options to request from the DHCP server.
+option domain_name_servers, domain_name, domain_search, host_name
+option classless_static_routes
+# Respect the network MTU. This is applied to DHCP routes.
+option interface_mtu
+
+# Most distributions have NTP support.
+#option ntp_servers
+
+# A ServerID is required by RFC2131.
+require dhcp_server_identifier
+
+# Generate SLAAC address using the Hardware Address of the interface
+#slaac hwaddr
+# OR generate Stable Private IPv6 Addresses based from the DUID
+slaac private
+nohook resolv.conf

+ 25 - 0
board/PSG/iot2000/rootfs_overlay/etc/init.d/S11crond

@@ -0,0 +1,25 @@
+#!/bin/sh
+#
+# Start crond
+#
+
+case "$1" in
+  start)
+        echo -e "Starting crond ...\n"
+        test -x /var/spool/cron || ln -s /var/cron /var/spool/cron
+        crond
+        ;;
+  stop)
+        echo -e "Stopping crond ...\n"
+        killall crond
+        ;;
+  restart|reload)
+        "$0" stop
+        "$0" start
+        ;;
+  *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+esac
+
+exit $?

+ 2 - 2
board/PSG/iot2000/rootfs_overlay/etc/init.d/S99Display_GSM

@@ -4,8 +4,8 @@
 #
 #
 #
 #
 APPNAME=Display_GSM
 APPNAME=Display_GSM
-APPBIN=/var/psg/Display_GSM
-
+APPBIN=/var/psg/Display_GSM.sh
+echo $APPBIN
 case "$1" in
 case "$1" in
   start)
   start)
         echo -e "Starting ${APPNAME} ...\n"
         echo -e "Starting ${APPNAME} ...\n"

+ 24 - 0
board/PSG/iot2000/rootfs_overlay/var/cron/crontabs/root

@@ -0,0 +1,24 @@
+# Edit this file to introduce tasks to be run by cron.
+#
+# Each task to run has to be defined through a single line
+# indicating with different fields when the task will be run
+# and what command to run for the task
+#
+# To define the time you can provide concrete values for
+# minute (m), hour (h), day of month (dom), month (mon),
+# and day of week (dow) or use '*' in these fields (for 'any').#
+# Notice that tasks will be started based on the cron's system
+# daemon's notion of time and timezones.
+#
+# Output of the crontab jobs (including errors) is sent through
+# email to the user the crontab file belongs to (unless redirected).
+#
+# For example, you can run a backup of all your user accounts
+# at 5 a.m every week with:
+# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
+#
+# For more information see the manual pages of crontab(5) and cron(8)
+#
+# m h  dom mon dow   command
+
+

BIN
board/PSG/iot2000/rootfs_overlay/var/psg/Display_GSM


+ 4 - 0
board/PSG/iot2000/rootfs_overlay/var/psg/Display_GSM.sh

@@ -0,0 +1,4 @@
+#!/bin/sh
+# start ModemAPP with Parameters
+
+/var/psg/Display_GSM modemtty=`ls /dev/ttyACM* | sed '2q;d'` gprstty=`ls /dev/ttyACM* | sed '1q;d'`