diff options
author | Matthias Hentges <oe@hentges.net> | 2007-06-06 02:27:38 +0000 |
---|---|---|
committer | Matthias Hentges <oe@hentges.net> | 2007-06-06 02:27:38 +0000 |
commit | 579875cdcbd028b73e09b077dc13138e867ba27d (patch) | |
tree | c8ed89a4e6d95b1cdd4349bdbb8ba564eccd76cf /packages/usb-gadget-mode/usb-gadget-mode.bb | |
parent | 97ed9a5df5501089de45ad25f98e86d0cac3d5d6 (diff) |
usb-gadget-mode: Add usb-gadget mode: An initscript to load the configured USB gadget module on boot
Diffstat (limited to 'packages/usb-gadget-mode/usb-gadget-mode.bb')
-rw-r--r-- | packages/usb-gadget-mode/usb-gadget-mode.bb | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/packages/usb-gadget-mode/usb-gadget-mode.bb b/packages/usb-gadget-mode/usb-gadget-mode.bb new file mode 100644 index 0000000000..7c2083e99b --- /dev/null +++ b/packages/usb-gadget-mode/usb-gadget-mode.bb @@ -0,0 +1,50 @@ +#! /bin/sh +# +# Copyright Matthias Hentges <devel@hentges.net> (c) 2007 +# License: MIT (see http://www.opensource.org/licenses/mit-license.php +# for a copy of the license) +# +# Filename: usb-gadget-mode.bb +# Date: 20070606 (YMD) + +DESCRIPTION = "Manage the default USB gadget mode" +MAINTAINER = "Matthias 'CoreDump' Hentges <oe@hentges.net>" +HOMEPAGE = "<homepage>" +LICENSE = "GPL" + +###################################################################################### + +PV = "0.0.1" +PR = "r0" + +###################################################################################### + +PACKAGE_ARCH = "${MACHINE}" + +###################################################################################### + +SRC_URI = "file://usb-gadget.conf \ + file://usb-gadget \ + file://usb-gadget.init" + +###################################################################################### + +do_install() { + install -d ${D}/etc + install -d ${D}/etc/init.d + install -d ${D}/usr/bin + + install -m 0644 ${WORKDIR}/usb-gadget.conf ${D}/etc + install -m 0755 ${WORKDIR}/usb-gadget.init ${D}/etc/init.d/usb-gadget + install -m 0755 ${WORKDIR}/usb-gadget ${D}/usr/bin +} + +pkg_postinst() { + + test -n "$D" && opt="-r $D" + update-rc.d $opt usb-gadget defaults 50 +} + +pkg_postrm() { + update-rc.d -f usb-gadget remove +} |