From: md@Linux.IT (Marco d'Itri) Date: Sun, 19 Dec 2004 17:04:42 +0000 Subject: reboot-less installation of udev Message-Id: <20041219170442.GB10775@wonderland.linux.it> MIME-Version: 1 Content-Type: multipart/mixed; boundary="5I6of5zJg18YgZEa" List-Id: To: linux-hotplug@vger.kernel.org --5I6of5zJg18YgZEa Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm working to make possible installing the debian udev package without the need for a reboot and without breaking the system. This is an untested draft of what I plan to do. Any comments? #!/bin/sh -e # mount -n is used because it gets very confused by --bind (see #282205) tempdir() { local dir=3D$(tempfile ${1:+--prefix=3D$1}) rm $dir mkdir $dir echo $dir } # create the directory which will hold our new /dev TEMPDEV=3D$(tempdir dev) mount -n --bind /dev /.dev mount -n -o size=3D5M,mode=3D0755 -t tmpfs none $TEMPDEV mkdir $TEMPDEV/pts/ $TEMPDEV/shm/ mount -n --bind /dev/pts/ $TEMPDEV/pts/ mount -n --bind /dev/shm/ $TEMPDEV/shm/ # make symlinks to the sockets and pipes on the old /dev find /dev -type s -o -type p | sed "s@/dev/@@" | \ while read file; do ln -s "/.dev/$file" "$TEMPDEV/$file" done # create a new config file which points to the temporary /dev TEMPCONF=3D$(tempfile --prefix=3Dudev.conf.) sed -e "s#/dev/#$TEMPDEV/#" < /etc/udev/udev.conf > $TEMPCONF UDEV_TEST=3D1 UDEV_CONFIG_FILE=3D$TEMPCONF /sbin/udevstart rm $TEMPCONF mount -n --move $TEMPDEV /dev --=20 ciao, | Marco | [9924 da/2KLWeH3k.E] --5I6of5zJg18YgZEa Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBxbSqFGfw2OHuP7ERAswAAJ9F1/ViH7SEd7s3TeeAnA7KCBjw9gCfZGbK S1NnDuIDKDQ5ooz7B3eZTPY= =Hbkr -----END PGP SIGNATURE----- --5I6of5zJg18YgZEa-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel