ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: Alexander Bokovoy <a.bokovoy@sam-solutions.net>
To: community@altlinux.ru
Subject: Re: [Comm] Как подключить USB device для юзера
Date: Wed, 16 Oct 2002 15:16:58 +0300
Message-ID: <20021016121658.GG21939@sam-solutions.net> (raw)
In-Reply-To: <20021016142912.721e5092.ill@krumn.oilnet.ru>

On Wed, Oct 16, 2002 at 02:29:12PM +0400, "Илья Брызгалов" wrote:
> Wed, 16 Oct 2002 03:38:12 +0800 Владимир Черный <v_black@mail.ru> написал:
> 
> ВЧ> Уважаемое сообщество!
> ВЧ> 1. В рассылке пробегала информация о подключении USB накопителей (типа флэшки
> ВЧ> фотоаппарата) используя монтирование этого девайса как сказевого... Но монтировать
> ВЧ> может только рут, а он не всегда тут :)
> a.Если монтирование через /dev/hands то в fstab добавьте в опциях users.
> b.Если через automount тоже users но в auto.tab.
Можно проще.

> ВЧ> Как сделать так, чтобы устройство само монтировалось, когда его подключает
> ВЧ> пользователь?
> юзать automount
> ВЧ> 
> ВЧ> 2. USB накопитель ZIV (на 15 га) ни в какую не хочет подключаться по указанной схеме -
> ВЧ> система сообщает, что нет соответствующего модуля. Может кто-то знает как подключить?
> Забудь про работу в линуксе с ZIV-ом, как забыл я (20Га):-(
> Похоже это устройство эксклюзивное для СНГ, в мире про него нигде не знают ИМХО.
> Я пользуюсь Storage BOX USB 2.0 на него есть модули.
У меня GemBird FlexiDrivE (USB 1.1, такой MobileRack для 3.5"-х IDE
устройств), работает на ура. Чтобы совсем не было проблем написал вот
такой скрипт для automount:
-------------------------------------------------------------------------
#!/bin/sh
REQUESTED=$1

RESOURCE=/proc/scsi/usb-storage-0/0

[ -f $RESOURCE ] || exit 1

DEVNUMBER=$(cat $RESOURCE|grep Host|cut -f5 -d' '|sed 's/[a-z:]//g;'|tr '[0-9]' '[a-z]')
DEVATTACHED=$(cat $RESOURCE|grep Attached|cut -f2 -d:)

[ "$DEVATTACHED" = " No " ] && exit 1

DEVPART=$(/sbin/fdisk -l /dev/sd${DEVNUMBER}|egrep "^/dev/"|cut -f1 -d' '|egrep "${REQUESTED}\$")

[ -z "$DEVPART" ] && exit 1

echo ":${DEVPART}"

exit 0
-------------------------------------------------------------------------
В /etc/auto.master прописал:
/mnt/usb	program:/usr/sbin/flexidrive-auto

Естественно, это не панацея и в частности обработку всех
/proc/scsi/usb-storage-*/* нужно делать более осмысленно.
-- 
/ Alexander Bokovoy
---
Give a small boy a hammer and he will find that everything he encounters
needs pounding.


      reply	other threads:[~2002-10-16 12:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-15 19:38 Владимир Черный
2002-10-16 10:29 ` "Илья Брызгалов"
2002-10-16 12:16   ` Alexander Bokovoy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021016121658.GG21939@sam-solutions.net \
    --to=a.bokovoy@sam-solutions.net \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git