From 0b4feb3a6c50bbbb1c119f39e9d44e26cc1a691d Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Wed, 17 Aug 2005 19:19:54 +0000 Subject: [PATCH] add hotplug here, temporarily disable e2fsck, so at least everything is mounted rw svn path=/nixu/trunk/; revision=3630 --- boot/boot.sh | 4 ++-- boot/default.nix | 2 +- fill-disk.sh | 5 +++++ init/default.nix | 2 +- make-disk.sh | 4 ++++ pkgs.nix | 6 +++--- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/boot/boot.sh b/boot/boot.sh index a6ce1f2d67a..0ef72d9907e 100644 --- a/boot/boot.sh +++ b/boot/boot.sh @@ -9,8 +9,8 @@ echo "--- Nix ---" echo "mounting /proc..." mount -n -t proc none /proc -echo "checking /dev/root..." -e2fsck -y /dev/root || test "$?" -le 1 +#echo "checking /dev/root..." +#e2fsck -y /dev/root || test "$?" -le 1 echo "remounting / writable..." mount -n -o remount,rw /dev/root / diff --git a/boot/default.nix b/boot/default.nix index 3724660ae22..315fab0e18d 100644 --- a/boot/default.nix +++ b/boot/default.nix @@ -1,7 +1,7 @@ { stdenv, kernel, bash, coreutils, findutils, utillinux, sysvinit, e2fsprogs , nettools, nix, subversion, gcc, wget, which, vim, less, screen, openssh , binutils, strace, shadowutils, iputils, gnumake, curl, gnused, gnugrep -, gnutar, gzip, mingetty, grubWrapper, parted, modutils}: +, gnutar, gzip, mingetty, grubWrapper, parted, modutils, hotplug}: derivation { name = "boot"; diff --git a/fill-disk.sh b/fill-disk.sh index 160822a5597..17e6dd42d04 100755 --- a/fill-disk.sh +++ b/fill-disk.sh @@ -7,6 +7,7 @@ kernel=@kernel@ sysvinitPath=@sysvinitPath@ bootPath=@bootPath@ modutils=@modutils@ +hotplug=@hotplug@ echo mounting special filesystems @@ -290,6 +291,10 @@ echo "192.168.150.1 uml" >> $root/etc/hosts ln -s @kernel@/vmlinuz $root/boot/vmlinuz ln -s @sysvinitPath@/sbin/init $root/sbin/init +ln -s @hotplug@/sbin/hotplug $root/sbin/hotplug +ln -s @hotplug@/etc/hotplug $root/etc/hotplug +ln -s @hotplug@/etc/hotplug.d $root/etc/hotplug.d +ln -s $device $root/dev/root echo installing bootloader diff --git a/init/default.nix b/init/default.nix index fae29176468..fbb983cba2d 100644 --- a/init/default.nix +++ b/init/default.nix @@ -1,4 +1,4 @@ -{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, modutils}: +{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, modutils, hotplug}: derivation { name = "init"; diff --git a/make-disk.sh b/make-disk.sh index 3384e78e742..4767e220acb 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -62,6 +62,7 @@ utillinux=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).utillinux' | e2fsprogs=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).e2fsprogs' | $NIX_CMD_PATH/nix-instantiate -)) modutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).modutils' | $NIX_CMD_PATH/nix-instantiate -)) grub=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX_CMD_PATH/nix-instantiate -)) +hotplug=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).hotplug' | $NIX_CMD_PATH/nix-instantiate -)) #gnused=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnused' | $NIX_CMD_PATH/nix-instantiate -)) #gnugrep=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX_CMD_PATH/nix-instantiate -)) @@ -113,6 +114,7 @@ cp -fau --parents ${Grub} ${archivesDir} cp -fau --parents ${Kernel} ${archivesDir} cp -fau --parents ${SysVinit} ${archivesDir} cp -fau --parents ${BootPath} ${archivesDir} +cp -fau --parents ${hotplug} ${archivesDir} bashdeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -))) @@ -131,6 +133,7 @@ sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \ -e "s^@modutils\@^$modutils^g" \ -e "s^@grub\@^$grub^g" \ -e "s^@kernel\@^$kernel^g" \ + -e "s^@hotplug\@^$hotplug^g" \ < $fill_disk > $fill_disk.tmp mv $fill_disk.tmp $fill_disk @@ -164,6 +167,7 @@ cp -fau --parents ${utilLinux} ${initdir} cp -fau --parents ${coreUtils} ${initdir} cp -fau --parents ${e2fsProgs} ${initdir} cp -fau --parents ${modUtils} ${initdir} +cp -fau --parents ${hotplug} ${initdir} touch ${initdir}/NIXOS diff --git a/pkgs.nix b/pkgs.nix index b530a8b00cd..f380bedc125 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -3,15 +3,15 @@ rec { stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip - mingetty grubWrapper syslinux parted modutils; + mingetty grubWrapper syslinux parted modutils hotplug; boot = (import ./boot) {inherit stdenv kernel bash coreutils findutils utillinux sysvinit e2fsprogs nettools nix subversion gcc wget which vim less screen openssh binutils strace shadowutils iputils gnumake curl - gnused gnutar gnugrep gzip mingetty grubWrapper parted modutils;}; + gnused gnutar gnugrep gzip mingetty grubWrapper parted modutils hotplug;}; init = (import ./init) {inherit stdenv bash coreutils - utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted modutils;}; + utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted modutils hotplug;}; everything = [boot init sysvinit kernel]; }