From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <42F761BE.8040103@vzljot.ru> Date: Mon, 08 Aug 2005 17:44:30 +0400 From: Vitaly Ostanin User-Agent: Mozilla Thunderbird 1.0.2 (X11/20050512) X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: ALT Linux Sisyphus discussion list References: <42F75808.4030000@vzljot.ru> In-Reply-To: X-Enigmail-Version: 0.91.0.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDF64F094F446ABC58B8AF933" X-Virus-Scanned: by amavisd-new at vzljot.ru Subject: [sisyphus] Re: livecd and usb flash X-BeenThere: sisyphus@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ALT Linux Sisyphus discussion list List-Id: ALT Linux Sisyphus discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Aug 2005 13:44:33 -0000 Archived-At: List-Archive: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigDF64F094F446ABC58B8AF933 Content-Type: multipart/mixed; boundary="------------060600050600050501040203" This is a multi-part message in MIME format. --------------060600050600050501040203 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Anton Farygin =D0=C9=DB=C5=D4: > On Mon, 08 Aug 2005 17:03:04 +0400, Vitaly Ostanin wrote: >=20 >=20 >>=FA=C4=D2=C1=D7=D3=D4=D7=D5=CA=D4=C5. >> >>=E4=CF=CB=CC=C1=C4=C1=C0, =DE=D4=CF livecd, =D3=CC=C5=D0=CC=C5=CE=CE=D9= =CA =C9=DA >>=D3=C5=C7=CF=C4=CE=D1=DB=CE=C5=C7=CF Sisyphus, =D0=CF =D0=D2=C5=D6=CE=C5= =CD=D5 =CC=CF=D7=C9=D4 kernel >>oops =D0=D2=C9 =D0=CF=D0=D9=D4=CB=C5 =C4=CF=C2=C1=D7=C9=D4=D8 rw =C2=D2= =C1=CE=DE /etc =CE=C1 >>=C6=CC=C5=DB=CB=D5. >> >>dmesg =D7 =C1=D4=D4=C1=DE=C5. >=20 >=20 > =FC=D4=CF=D4 oops =C4=CF=CC=D6=C5=CE =C2=D9=CC =C2=D9=D4=D8 =C9=D3=D0=D2= =C1=D7=CC=C5=CE =D7 =D0=CF=D3=CC=C5=C4=CE=C5=CD snapshot'=C5 unionfs. =F0=CF-=CD=CF=C5=CD=D5, =DC=D4=CF =D5=D6=C5 =C4=D2=D5=C7=CF=CA oops. > =E1 =D2=C1=D3=D3=CB=C1=D6=C9 =D0=CC=DA =D0=CF=C4=D2=CF=C2=CE=C5=C5, =DE= =C5=CD =D4=D9 =C2=D2=DC=CE=DE =C4=CF=C2=C1=D7=CC=D1=C5=DB=D8 ? =D4=D5=CC=DA= =C1=CD=C9 =C1=CC=D8 =D7=D2=D5=DE=CE=D5=C0 ? unionctl, =D7 =C1=D4=D4=C1=DE=C5 =D3=CB=D2=C9=D0=D4 =C4=CC=D1 =D0=D2=CF=C6= =C9=CC=D1 =D3=C5=D0=C1=D2=C1=D4=CF=D2=C1. =E1 =CB=C1=CB =CD=CF=D6=CE=CF =DC= =D4=CF =D3=C4=C5=CC=C1=D4=D8 =D7=D2=D5=DE=CE=D5=C0? --=20 Regards, Vyt mailto: vyt@vzljot.ru JID: vyt@vzljot.ru --------------060600050600050501040203 Content-Type: text/plain; name="05usbroot" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="05usbroot" cat <> $ROOT/etc/uniontab /etc /home /root /var/mail E_O_F $in_chroot /bin/mkdir -p /etc/dev.d/block cat <> $ROOT/etc/dev.d/block/usbdrive.dev #!/bin/sh -x # # USB drive hotplug agent for 2.6 kernels # # ACTION=add # DEVPATH=/block/* # cd /etc/hotplug . ./hotplug.functions SourceIfNotEmpty /etc/sysconfig/hotplug if [ "\$HOTPLUG" == "no" -o "\$USBPLUG" == "no" ];then exit 0 fi STATEPATH=/var/lib/hotplug UNIONTAB=/etc/uniontab UNIONCTL=/usr/sbin/unionctl MOUNT=/bin/mount USBROOT=/media/storage_usbroot [ -x \$UNIONCTL -a -x \$MOUNT ] || exit 1 function restart_services() { mesg "Restarting services with \"usbroot\" settings..." [ -s \$USBROOT/etc/sysconfig/clock ] && /sbin/service clock start [ -d \$USBROOT/etc/net ] && /sbin/service network restart } function add_unionfs_branches_to_usbroot() { mesg "Adding unionfs branches to \$USBROOT" grep -ve '^\(#\|\$\)' \$UNIONTAB |while read mntpt; do if [ -d \$mntpt ]; then mkdir -p \$USBROOT/\$mntpt mesg "Adding unionfs rw branch for \$mntpt to \$USBROOT/\$mntpt ..." \$UNIONCTL \$mntpt --add --mode rw \$USBROOT/\$mntpt && \ mesg "Successfully added unionfs branch for \$mntpt" || \ mesg "Adding unionfs branch for \$mntpt failed." fi [ \$mntpt == /etc ] && restart_services done } function mount_usbroot() { /bin/mkdir \$USBROOT mesg "Trying to mount /dev/\$NAME to \$USBROOT ..." \$MOUNT /dev/\$NAME \$USBROOT -o sync && mesg "Successfully mounted." || exit 1 mesg "Removing \$USBROOT/etc/mtab" rm -f \$USBROOT/etc/mtab if [ -s \$UNIONTAB ]; then add_unionfs_branches_to_usbroot fi } case \$ACTION in add) # FIXME: how to detect LABEL from udev (or HAL) ? NAME=\`udevinfo -q name -p \$DEVPATH\` # FIXME: remove trailing space from blkid output ? LABEL=\`blkid /dev/\$NAME -s LABEL | cut -d '=' -f2\` [ \$LABEL == \"usbroot\" ] || exit 0 mesg "Found label \$LABEL on \$DEVPATH" mount_usbroot exit 0 ;; remove) # FIXME: udevinfo not works without device NAME=\`udevinfo -q name -p \$DEVPATH\` umount /dev/\$NAME exit 0 ;; *) debug_mesg USB drive \$ACTION event not supported exit 1 ;; esac E_O_F $in_chroot /bin/chmod 755 /etc/dev.d/block/usbdrive.dev --------------060600050600050501040203-- --------------enigDF64F094F446ABC58B8AF933 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFC92G+XQgvvSRg+k4RAoxrAJ4yBRrrXDZGg/52TX+7mQbypIBW8ACcD5kh mMhbLbgcWejNRq/zbLGTI0s= =mCcR -----END PGP SIGNATURE----- --------------enigDF64F094F446ABC58B8AF933--