[Eisfair] USB Drucke?==?utf-8?Q?rproblem
frank.oeser at gmx.net
frank.oeser at gmx.net
Mi Dez 13 16:43:35 CET 2017
HWR # cat /etc/fstab
/dev/sda3 / ext4 defaults,errors=remount-ro 0 1
/dev/sda1 /boot ext4 defaults,errors=remount-ro 0 1
/dev/sda2 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /media/floppy auto defaults,user,noauto 0 0
/dev/cdrom /media/cdrom iso9660 defaults,ro,user,noauto 0 0
devpts /dev/pts devpts defaults 0 0
usbfs /proc/bus/usb usbfs defaults 0 0
/sys /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
tmpfs /run tmpfs defaults 0 0
HWR #
HWR # cat /etc/init.d/usb
#! /bin/sh
#-----------------------------------------------------------------------
-----
# /etc/init.d/usb - load or unload usb drivers
#
# Creation : 2004-03-12 fh
# Last Update: $Id: usb 35244 2014-03-17 12:42:50Z hbfl $
#
# Copyright (c) 2001-2014 the eisfair team, team(at)eisfair(dot)org
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#-----------------------------------------------------------------------
-----
# read functions
/etc/init.d/functions
# include config file
/etc/config.d/usb
load='/sbin/modprobe'
unload='/sbin/rmmod'
printer='usblp'
# dont unload module if usb-drive given
if [ -f /boot/usb-drive ]
then
usb_drive=1
fi
#
------------------------------------------------------------------------
---
# usage
#
------------------------------------------------------------------------
---
usage ()
{
cat <<EOF
Usage:
${0}
-q, --quiet suppress all normal output
[start]
[stop]
[restart]
[forcestart]
EOF
}
#
------------------------------------------------------------------------
---
# start usb
#
------------------------------------------------------------------------
---
usb_start ()
{
if "${start_force:-false}"
then
START_USB='yes'
fi
if [ "${START_USB}" = "yes" ]
then
boot_mesg " * Starting usb ..."
${load} usbcore 2>/dev/null
if [ "${USB_PRINTER}" = "yes" ]
then
${load} ${printer} 2>/dev/null
fi
if [ "${USB_STORAGE}" = "yes" ]
then
${load} usb-storage 2>/dev/null
fi
if [ "${USB_SERIAL}" = "yes" ]
then
${load} usbserial 2>/dev/null
${load} "${USB_SERIAL_DRIVER}" "${USB_SERIAL_OPTIONS}"
2>/dev/null
fi
if [ -z "$(mount -t usbfs)" ]
then
mount -t usbfs usbfs /proc/bus/usb
fi
evaluate_retval
fi
}
#
------------------------------------------------------------------------
---
# stop usb
#
------------------------------------------------------------------------
---
usb_stop ()
{
boot_mesg " * Stopping usb ..."
if [ "${USB_PRINTER}" = "yes" ]
then
${unload} ${printer} 2>/dev/null
fi
if [ "${USB_STORAGE}" = "yes" ]
then
if [ ${usb_drive:-0} -eq 0 ]
then
${unload} usb-storage 2>/dev/null
fi
fi
if [ "${USB_SERIAL}" = "yes" ]
then
${unload} "${USB_SERIAL_DRIVER}" 2>/dev/null
${unload} usbserial 2>/dev/null
fi
evaluate_retval
}
#
------------------------------------------------------------------------
---
# restart usb
#
------------------------------------------------------------------------
---
usb_restart()
{
usb_stop
sleep 2
usb_start
}
#
------------------------------------------------------------------------
---
# main usb
#
------------------------------------------------------------------------
---
while [ "${#}" -gt 0 ]
do
case "${1}" in
-q|--quiet)
_quiet=true
shift
;;
*)
_action="${1}"
shift
;;
esac
done
case "${_action}" in
start)
usb_start
;;
stop)
usb_stop
;;
restart)
usb_restart
;;
forcestart)
start_force=true
usb_start
;;
*)
usage
exit 1
;;
esac
exit 0
#
------------------------------------------------------------------------
---
# end
#
------------------------------------------------------------------------
---
HWR #
Mehr Informationen über die Mailingliste Eisfair