[oe-commits] Stefan Schmidt : initscripts-1.0: Add special bootmisc for bug20 to set the GPS serial port correctly.

git version control git at git.openembedded.org
Thu Dec 16 14:05:16 UTC 2010


Module: openembedded.git
Branch: master
Commit: 7106d1eae3d46c8eb3be4136da29185e4cfb8d6a
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=7106d1eae3d46c8eb3be4136da29185e4cfb8d6a

Author: Stefan Schmidt <stefan at buglabs.net>
Date:   Mon Dec 13 16:48:15 2010 +0100

initscripts-1.0: Add special bootmisc for bug20 to set the GPS serial port correctly.

---

 .../initscripts/initscripts-1.0/bug20/bootmisc.sh  |   85 ++++++++++++++++++++
 recipes/initscripts/initscripts_1.0.bb             |    2 +-
 2 files changed, 86 insertions(+), 1 deletions(-)

diff --git a/recipes/initscripts/initscripts-1.0/bug20/bootmisc.sh b/recipes/initscripts/initscripts-1.0/bug20/bootmisc.sh
new file mode 100755
index 0000000..ba55c7c
--- /dev/null
+++ b/recipes/initscripts/initscripts-1.0/bug20/bootmisc.sh
@@ -0,0 +1,85 @@
+#
+# bootmisc.sh	Miscellaneous things to be done during bootup.
+#
+
+. /etc/default/rcS
+#
+# Put a nologin file in /etc to prevent people from logging in before
+# system startup is complete.
+#
+if test "$DELAYLOGIN" = yes
+then
+  echo "System bootup in progress - please wait" > /etc/nologin
+  cp /etc/nologin /etc/nologin.boot
+fi
+
+#
+# Set pseudo-terminal access permissions.
+#
+if ( ! grep -q devfs /proc/mounts ) && test -c /dev/ttyp0
+then
+	chmod 666 /dev/tty[p-za-e][0-9a-f]
+	chown root:tty /dev/tty[p-za-e][0-9a-f]
+fi
+
+#
+# Apply /proc settings if defined
+#
+SYSCTL_CONF="/etc/sysctl.conf"
+if [ -f "${SYSCTL_CONF}" ]
+then
+	if [ -x "/sbin/sysctl" ]
+	then
+		/sbin/sysctl -p "${SYSCTL_CONF}"
+	else
+		echo "To have ${SYSCTL_CONF} applied during boot, install package <procps>."
+	fi
+fi
+
+#
+# Update /etc/motd.
+#
+if test "$EDITMOTD" != no
+then
+	uname -a > /etc/motd.tmp
+	sed 1d /etc/motd >> /etc/motd.tmp
+	mv /etc/motd.tmp /etc/motd
+fi
+
+#
+# This is as good a place as any for a sanity check
+# /tmp should be a symlink to /var/tmp to cut down on the number
+# of mounted ramdisks.
+if test ! -L /tmp && test -d /var/tmp
+then
+	rm -rf /tmp
+	ln -sf /var/tmp /tmp
+fi
+
+#
+# Update dynamic library cache, but only if ld.so.conf is present
+#
+if [ -e /etc/ld.so.conf ] ; then
+	/sbin/ldconfig
+fi
+
+# Set the system clock from hardware clock
+# If the timestamp is 1 day or more recent than the current time,
+# use the timestamp instead.
+test -x /etc/init.d/hwclock.sh && /etc/init.d/hwclock.sh start
+if test -e /etc/timestamp
+then
+	SYSTEMDATE=`date "+%Y%m%d"`
+	TIMESTAMP=`cat /etc/timestamp | awk '{ print substr($0,9,4) substr($0,1,4);}'`
+        NEEDUPDATE=`expr \( $TIMESTAMP \> $SYSTEMDATE \)`                                                 
+        if [ $NEEDUPDATE -eq 1 ]; then 
+		date `cat /etc/timestamp`
+		/etc/init.d/hwclock.sh stop
+	fi
+fi
+
+if test -e /dev/ttyS0
+then
+        stty -F /dev/ttyS0 -onlcr
+fi
+: exit 0
diff --git a/recipes/initscripts/initscripts_1.0.bb b/recipes/initscripts/initscripts_1.0.bb
index cc60624..3987c60 100644
--- a/recipes/initscripts/initscripts_1.0.bb
+++ b/recipes/initscripts/initscripts_1.0.bb
@@ -4,7 +4,7 @@ PRIORITY = "required"
 DEPENDS = "makedevs"
 RDEPENDS_${PN} = "makedevs"
 LICENSE = "GPL"
-PR = "r124"
+PR = "r125"
 
 SRC_URI = "file://functions \
            file://halt \





More information about the Openembedded-commits mailing list