1 # Copyright Matthias Hentges
<devel@hentges.net
> (c
) 2007
2 # License
: MIT
(see http
://www.opensource.org
/licenses
/mit
-license.php
3 #
for a copy of the license
)
5 # Filename
: usb
-gadget
-mode.bb
8 DESCRIPTION
= "Manage the default USB gadget mode"
9 SECTION
= "console/network"
15 file://usb-gadget.conf \
17 file://usb-gadget.init \
21 install
-d $
{D
}$
{sysconfdir
}
22 install
-d $
{D
}$
{sysconfdir
}/init.d
23 install
-d $
{D
}$
{bindir
}
24 install
-d $
{D
}$
{sysconfdir
}/default
26 install
-m
0644 $
{WORKDIR
}/usb
-gadget.conf $
{D
}$
{sysconfdir
}/default/usb
-gadget
27 install
-m
0755 $
{WORKDIR
}/usb
-gadget.init $
{D
}$
{sysconfdir
}/init.d
/usb
-gadget
28 install
-m
0755 $
{WORKDIR
}/usb
-gadget $
{D
}$
{bindir
}
31 pkg_postinst_$
{PN
}() {
32 test
-n
"$D" && opt
="-r $D"
33 update
-rc.d $opt usb
-gadget defaults
50
37 update
-rc.d
-f usb
-gadget remove
40 PACKAGE_ARCH_$
{PN
} = "${MACHINE_ARCH}"