From: Michael Mrozek Date: Sat, 7 Dec 2013 03:18:52 +0000 (+0100) Subject: pandora-skel: Add script that automatically does ntpdate whenever NetworkManager... X-Git-Tag: sz_160~20 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=105cfe05d927eecb94751da049d81d54eb196891;p=openpandora.oe.git pandora-skel: Add script that automatically does ntpdate whenever NetworkManager connects to the network --- diff --git a/recipes/pandora-system/pandora-skel.bb b/recipes/pandora-system/pandora-skel.bb index 3b85dca..d0d4030 100644 --- a/recipes/pandora-system/pandora-skel.bb +++ b/recipes/pandora-system/pandora-skel.bb @@ -5,7 +5,7 @@ COMPATIBLE_MACHINE = "omap3-pandora" # /etc/skel is used by Shadow's useradd so you really have that installed for this to make sense ;) RDEPENDS = "shadow" -PR = "r22" +PR = "r23" SRC_URI = " \ file://.xinitrc \ @@ -32,6 +32,9 @@ do_install() { install -d ${D}${sysconfdir}/skel/Desktop install -d ${D}${sysconfdir}/modutils/ install -d ${D}${sysconfdir}/pandora/ + install -d ${D}${sysconfdir}/NetworkManager/ + install -d ${D}${sysconfdir}/NetworkManager/dispatcher.d/ + install -m 0755 ${WORKDIR}/ntpdate.sh ${D}${sysconfdir}/NetworkManager/dispatcher.d/ntpdate.sh install -m 0644 ${WORKDIR}/.xinitrc ${D}${sysconfdir}/skel/.xinitrc install -m 0644 ${WORKDIR}/vimrc ${D}${sysconfdir}/skel/.vimrc install -m 0644 ${WORKDIR}/bashrc ${D}${sysconfdir}/skel/.bashrc diff --git a/recipes/pandora-system/pandora-skel/ntpdate.sh b/recipes/pandora-system/pandora-skel/ntpdate.sh new file mode 100644 index 0000000..c0a09da --- /dev/null +++ b/recipes/pandora-system/pandora-skel/ntpdate.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Sync time via ntp whenever NetworkManager connects + +case "$2" in + up) + ntpdate pool.ntp.org + ;; + *) + ;; +esac