ALT Linux kernel packages development
 help / color / mirror / Atom feed
* [d-kernel] packet writing support scripts
@ 2004-10-07 18:10 Konstantin A. Lepikhov
  2004-10-07 19:25 ` Dmitry V. Levin
  2004-10-12  6:54 ` Michael Shigorin
  0 siblings, 2 replies; 3+ messages in thread
From: Konstantin A. Lepikhov @ 2004-10-07 18:10 UTC (permalink / raw)
  To: ALT Linux Kernel Devel Mailing List

[-- Attachment #1: Type: text/plain, Size: 733 bytes --]

Здравствуйте!

Задолбало меня родителям объяснять, как надо правильно pktcdvd подключать,
решил сваять скриптик, который это делает автоматом. Работает он по
аналогии с idetune, т.е. запускается из rc.sysinit, умеет смотреть версии
ядра (чтобы лишний раз не стартовать) и возможности привода (чтобы не
пытаться поднять pktsetup на обычном cdrom'е :) Критика приветствуется,
т.к. сделано все на коленке и кривовато.

ЗЫ Так когда же в Сизиф уйдет новое wks26 ядро и появится
kernel-source-2.4.27?

-- 
WBR, Konstantin	      chat with ==>ICQ: 109916175
     Lepikhov,	      speak  to ==>JID: lakostis@jabber.org
aka L.A. Kostis       write  to ==>mailto:lakostis@pisem.net.nospam

...The information is like the bank... 			  (c) EC8OR

[-- Attachment #2: pktsetup --]
[-- Type: text/plain, Size: 1224 bytes --]

#!/bin/sh
#
# /etc/rc.d/scripts/pktsetup - run once at boot time from rc.sysinit
#

# Setup packet device for writing.
# based on /etc/rc.d/scripts/idetune
# written by LAKostis <lakostis at altlinux.org>


WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

PKTSETUP=/usr/bin/pktsetup
[ -x "$PKTSETUP" ] || exit 0

# in ALTLinux only wks* and std26-* kernel have packet writing support
check_kernel()
{
		local flavor
		local kver
		local valid=0

		flavor=`/bin/uname -r|/bin/cut -d- -f2`
		kver=`kernelversion_minor`

		[ "$kver" -gt 5 ] && `egrep -qs '(std|wks)26' "$flavor"`
		[ "$kver" -eq 4 ] && `egrep -qs 'wks' "$flavor"`
		valid=$?
		echo "$valid"
}		
check_drive()
{
		local drive=$1
		local valid

		`dmesg|egrep -qs "$drive\:.*\/RW"`
		valid=$?
		echo "$valid"
}
# Reset parameters.
sourced=
SourceIfNotEmpty /etc/sysconfig/pktsetup && sourced=1
[ -n "$sourced" ] || continue
if [ -n "$DEVICES" ] && [ "`check_kernel`" -eq 1 ] 2>/dev/null; then
		modprobe pktcdvd
		for DEVICE in "$DEVICES"; do
				if [ "`check_drive $DEVICE`" -eq 1 ]; then
						i=0
						action "Mapping $DEVICE drive as packet device pktcdvd$i:" "$PKTSETUP" pktcdvd$i "$DEVICE"
						i=`expr $i + 1`
				fi
		done		
fi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [d-kernel] packet writing support scripts
  2004-10-07 18:10 [d-kernel] packet writing support scripts Konstantin A. Lepikhov
@ 2004-10-07 19:25 ` Dmitry V. Levin
  2004-10-12  6:54 ` Michael Shigorin
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry V. Levin @ 2004-10-07 19:25 UTC (permalink / raw)
  To: ALT Linux Kernel Devel Mailing List; +Cc: Sergey Vlasov

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

Hi,

On Thu, Oct 07, 2004 at 10:10:48PM +0400, Konstantin A. Lepikhov wrote:
[...]
> ЗЫ Так когда же в Сизиф уйдет новое wks26 ядро и появится
> kernel-source-2.4.27?

И правда, когда?


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [d-kernel] packet writing support scripts
  2004-10-07 18:10 [d-kernel] packet writing support scripts Konstantin A. Lepikhov
  2004-10-07 19:25 ` Dmitry V. Levin
@ 2004-10-12  6:54 ` Michael Shigorin
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Shigorin @ 2004-10-12  6:54 UTC (permalink / raw)
  To: ALT Linux Kernel Devel Mailing List

On Thu, Oct 07, 2004 at 10:10:48PM +0400, Konstantin A. Lepikhov wrote:
> kernel-source-2.4.27?

Или уже .28?..

-- 
 ---- WBR, Michael Shigorin <mike@altlinux.ru>
  ------ Linux.Kiev http://www.linux.kiev.ua/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-12  6:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 18:10 [d-kernel] packet writing support scripts Konstantin A. Lepikhov
2004-10-07 19:25 ` Dmitry V. Levin
2004-10-12  6:54 ` Michael Shigorin

ALT Linux kernel packages development

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel-kernel/0 devel-kernel/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 devel-kernel devel-kernel/ http://lore.altlinux.org/devel-kernel \
		devel-kernel@altlinux.org devel-kernel@altlinux.ru devel-kernel@altlinux.com
	public-inbox-index devel-kernel

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


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