X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-libusb;h=0d047a87bf84e8b73ef90305eb7df20b6702d83b;hb=5f02c8c4b5fe6640bcdb61d1006256289a57c222;hp=4c01940f1172cc86b9fc76aad15b668c731217dd;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-libusb b/stage3/cis-libusb index 4c01940..0d047a8 100755 --- a/stage3/cis-libusb +++ b/stage3/cis-libusb @@ -1,30 +1,38 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name. +# Remaining arguments are additional configure options. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + # Applying patches (if any) -apply_patches ${1} && +apply_patches ${PACKAGE} -cd ${LFS_TMP}/${1} && +cd ${LFS_TMP}/${PACKAGE} ./configure \ --prefix=/usr \ --sysconfdir=/etc \ - --disable-build-docs && -make && -make install && + ${CONFIGURE_OPTS} +make +make install +ldconfig -hv_groupadd -g 14 usb && +cat > /etc/udev/rules.d/23-usb.rules << "EOF" +# Set group ownership for raw USB devices +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" +EOF # Checking if string exists -if ! grep "/proc/bus/usb" /etc/fstab 1> /dev/null 2>&1; then - echo "usbfs /proc/bus/usb usbfs ddevgid=14,devmode=0660 0 0" >> /etc/fstab || exit 1 -fi && - -ldconfig +#if ! grep "/proc/bus/usb" /etc/fstab 1> /dev/null 2>&1; then +# echo "usbfs /proc/bus/usb usbfs ddevgid=14,devmode=0660 0 0" >> /etc/fstab +#fi -# Return last error exit $?