From 105cfe05d927eecb94751da049d81d54eb196891 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Sat, 7 Dec 2013 04:18:52 +0100 Subject: [PATCH] pandora-skel: Add script that automatically does ntpdate whenever NetworkManager connects to the network --- recipes/pandora-system/pandora-skel.bb | 5 ++++- recipes/pandora-system/pandora-skel/ntpdate.sh | 10 ++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 recipes/pandora-system/pandora-skel/ntpdate.sh 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 -- 2.39.5