* store the value of hotplug in /etc/sysconfig/hotplug and cat this value

to /proc/sys/kernel/hotplug during boot. (FIXME, install hotplug during
install of NixOS)
* /dev/input is created by udev

svn path=/nixu/trunk/; revision=4660
This commit is contained in:
Armijn Hemel 2006-02-01 13:31:52 +00:00
parent 78767321ce
commit 89df039e35
4 changed files with 14 additions and 44 deletions

View File

@ -31,6 +31,9 @@ echo "cleaning utmp and wtmp..."
echo "" > /var/run/utmp echo "" > /var/run/utmp
echo "" > /var/log/wtmp echo "" > /var/log/wtmp
echo "setting hotplug..."
cat /etc/sysconfig/hotplug > /proc/sys/kernel/hotplug
echo "loading USB controller modules..." echo "loading USB controller modules..."
@module_init_tools@/sbin/modprobe uhci-hcd @module_init_tools@/sbin/modprobe uhci-hcd

View File

@ -146,7 +146,6 @@ make_dir 00755 /bin
make_dir 00755 /boot make_dir 00755 /boot
make_dir 00755 /dev make_dir 00755 /dev
make_dir 00755 /dev/pts make_dir 00755 /dev/pts
make_dir 00755 /dev/input
make_dir 00755 /etc # global non-constant configuration make_dir 00755 /etc # global non-constant configuration
make_dir 00755 /etc/ssh make_dir 00755 /etc/ssh
make_dir 00755 /etc/sysconfig make_dir 00755 /etc/sysconfig
@ -359,15 +358,25 @@ cp @kernel@/lib/modules/$version/modules.* $root/lib/modules/$version
chmod 644 $root/lib/modules/$version/modules.* chmod 644 $root/lib/modules/$version/modules.*
### ###
### Do funky stuff with grub here. ### hotplug
### ###
echo "@hotplug@/sbin/hotplug" > $root/etc/sysconfig/hotplug
ln -s @hotplug@/sbin/hotplug $root/sbin/hotplug ln -s @hotplug@/sbin/hotplug $root/sbin/hotplug
ln -s @hotplug@/etc/hotplug $root/etc/hotplug ln -s @hotplug@/etc/hotplug $root/etc/hotplug
ln -s @hotplug@/etc/hotplug.d $root/etc/hotplug.d ln -s @hotplug@/etc/hotplug.d $root/etc/hotplug.d
###
### init
###
ln -s $device $root/dev/root ln -s $device $root/dev/root
ln -s @sysvinitPath@/sbin/init /sbin/init ln -s @sysvinitPath@/sbin/init /sbin/init
###
### Do funky stuff with grub here.
###
echo installing bootloader echo installing bootloader
grub-install --root-directory=${root} --no-floppy ${targetdrive} grub-install --root-directory=${root} --no-floppy ${targetdrive}

View File

@ -1,6 +0,0 @@
rec {
inherit (import /nixpkgs/trunk/pkgs/system/i686-linux.nix)
stdenv kernel ov511;
everything = [kernel ov511];
}

View File

@ -1,36 +0,0 @@
#! /bin/sh -e
#archivesDir=$(@mktemp@/bin/mktemp -d)
archivesDir=/
cpwd=@coreutils@/bin/pwd
storeExpr=$(@nix@/bin/nix-store -qR $(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).everything' | @nix@/bin/nix-instantiate -)))
kernel=$(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).kernel' | @nix@/bin/nix-instantiate -))
ov511=$(@nix@/bin/nix-store -r $(echo '(import ./kernel.nix).ov511' | @nix@/bin/nix-instantiate -))
#echo making kernel stuff
kernelVersion=$(cd $kernel/lib/modules/; @coreutils@/bin/ls -d *)
@coreutils@/bin/mkdir -p $archivesDir/lib/modules/$kernelVersion
#echo $kernelVersion
cd $kernel
# make directories
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
# link all files
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $kernel/% $archivesDir/%
# make directories
cd $ov511
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type d | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/mkdir -p $archivesDir/%
# link all files
@findutils@/bin/find . -not -path "./lib/modules/$kernelVersion/build*" -type f | @findutils@/bin/xargs -n 1 -i% @coreutils@/bin/ln -s $ov511/% $archivesDir/%