Merge commit 'adbc448df6520702b697938417b53e157e26a927' into dora

This commit is contained in:
Holger Hans Peter Freyther 2015-02-14 13:37:01 +01:00
commit c2ee669136
7 changed files with 131 additions and 8 deletions

View File

@ -1,6 +1,6 @@
SYSMOCOM := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
FILESEXTRAPATHS_prepend := "${SYSMOCOM}/netbase-${PV}:${SYSMOCOM}/netbase:"
PRINC = "8"
PRINC = "9"
# systemd does not look at /etc/rcS.d for the script. Make sure
# there is a symlink available

View File

@ -0,0 +1,91 @@
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: networking
# Required-Start: mountvirtfs $local_fs
# Required-Stop: $local_fs
# Should-Start: ifupdown
# Should-Stop: ifupdown
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Raise network interfaces.
### END INIT INFO
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
[ -x /sbin/ifup ] || exit 0
check_network_file_systems() {
[ -e /proc/mounts ] || return 0
if [ -e /etc/iscsi/iscsi.initramfs ]; then
echo "not deconfiguring network interfaces: iSCSI root is mounted."
exit 0
fi
exec 9<&0 < /proc/mounts
while read DEV MTPT FSTYPE REST; do
case $DEV in
/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
echo "not deconfiguring network interfaces: network devices still mounted."
exit 0
;;
esac
case $FSTYPE in
nfs|nfs4|smbfs|ncp|ncpfs|cifs|coda|ocfs2|gfs|pvfs|pvfs2|fuse.httpfs|fuse.curlftpfs)
echo "not deconfiguring network interfaces: network file systems still mounted."
exit 0
;;
esac
done
exec 0<&9 9<&-
}
check_network_swap() {
[ -e /proc/swaps ] || return 0
exec 9<&0 < /proc/swaps
while read DEV MTPT FSTYPE REST; do
case $DEV in
/dev/nbd*|/dev/nd[a-z]*|/dev/etherd/e*)
echo "not deconfiguring network interfaces: network swap still mounted."
exit 0
;;
esac
done
exec 0<&9 9<&-
}
case "$1" in
start)
echo -n "Configuring network interfaces... "
mkdir /run/network || true
sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
ifup -a
echo "done."
;;
stop)
check_network_file_systems
check_network_swap
echo -n "Deconfiguring network interfaces... "
ifdown -a
echo "done."
;;
force-reload|restart)
echo "Running $0 $1 is deprecated because it may not enable again some interfaces"
echo "Reconfiguring network interfaces... "
ifdown -a || true
ifup -a
echo "done."
;;
*)
echo "Usage: /etc/init.d/networking {start|stop}"
exit 1
;;
esac
exit 0

View File

@ -7,10 +7,19 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
SRC_URI = "file://sysmocom-vpn.conf"
PR = "r4"
CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf"
CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf.off"
PACKAGE_ARCH = "all"
do_install() {
install -d ${D}${sysconfdir}/openvpn
install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn
install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn/sysmocom-vpn.conf.off
}
# Always enable the OpenVPN service. This assumes that
# this package will never be inside the nornal sysmocom
# feed.
FILES_${PN} += "${systemd_unitdir}"
do_install_append() {
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
ln -sf ../openvpn.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
}

View File

@ -0,0 +1,12 @@
[Unit]
Description=GPS Service Daemon
After=syslog.target network.target
[Service]
EnvironmentFile=-/etc/default/gpsd
ExecStart=/usr/sbin/gpsd -N -F $GPSD_SOCKET $GPSD_OPTIONS $GPS_DEVICES
Restart=always
RestartSec=2
[Install]
WantedBy=multi-user.target

View File

@ -6,7 +6,7 @@ DEPENDS = "ncurses python"
#DEPENDS = "ncurses libusb1 python"
PROVIDES = "virtual/gpsd"
PR = "r3.18"
PR = "r3.19"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
@ -19,6 +19,9 @@ SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://gpsd \
file://60-gpsd.rules \
"
SRC_URI_append_sysmocom-idu = " file://gpsd.service "
SRC_URI[md5sum] = "fc5b03aae38b9b5b6880b31924d0ace3"
SRC_URI[sha256sum] = "706fc2c1cf3dfbf87c941f543381bccc9c4dc9f8240eec407dcbf2f70b854320"
@ -105,6 +108,13 @@ do_install_append() {
#install -m 755 ${S}/gps/*.py ${D}/${PYTHON_SITEPACKAGES_DIR}/gps
}
do_install_append_sysmocom-idu() {
install -d ${D}${systemd_unitdir}/system/multi-user.target.wants/
install -m 0644 ${WORKDIR}/gpsd.service ${D}${systemd_unitdir}/system/
ln -sf ../gpsd.service ${D}${systemd_unitdir}/system/multi-user.target.wants/
}
pkg_postinst_${PN}-conf() {
update-alternatives --install ${sysconfdir}/default/gpsd gpsd-defaults ${sysconfdir}/default/gpsd.default 10
}
@ -134,6 +144,7 @@ FILES_libgps = "${libdir}/libgps.so.*"
DESCRIPTION_gpsd-conf = "gpsd configuration files and init scripts"
FILES_gpsd-conf = "${sysconfdir}"
FILES_gpsd-conf_append_sysmocom-idu = " ${systemd_unitdir}/system/ "
CONFFILES_gpsd-conf = "${sysconfdir}/default/gpsd.default"
DESCRIPTION_gpsd-gpsctl = "Tool for tweaking GPS modes"

View File

@ -1,6 +1,6 @@
PROVIDES = ""
SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master"
SRCREV = "de2b004a2511c4aaeed64d0a9f5bf14d184d1560"
SRCREV = "9bd8556fcf45b83f880fbb1cdb7c614b940d7272"
PR = "r2"
COMPATIBLE_MACHINE="sysmocom-odu"
@ -16,8 +16,8 @@ require barebox.inc
do_pre_configure() {
cp ${S}/arch/arm/configs/am335x_mlo_defconfig_odu ${S}/.config
oe_runmake oldconfig
cp ${S}/arch/arm/configs/am335x_mlo_odu_defconfig ${S}/.config
oe_runmake oldconfig
}
do_deploy_append() {

View File

@ -1,5 +1,5 @@
SRC_URI = "git://git.sysmocom.de/barebox;protocol=git;branch=master"
SRCREV = "03773b872987fb16725f2eba6536cc87f000eb4d"
SRCREV = "9bd8556fcf45b83f880fbb1cdb7c614b940d7272"
PR = "r2"
DEPENDS = "${PN}-mlo"