mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 23:22:37 +00:00
add dhcp package. This doesn't work quite nicely though, needs some resolving...
svn path=/nixu/trunk/; revision=3653
This commit is contained in:
parent
6e7614fdb0
commit
4c6230b0a6
@ -38,6 +38,7 @@ for i in $boot $halt $login $env; do
|
||||
-e "s^@module_init_tools\@^$module_init_tools^g" \
|
||||
-e "s^@grub\@^$grub^g" \
|
||||
-e "s^@udev\@^$udev^g" \
|
||||
-e "s^@dhcp\@^$dhcp^g" \
|
||||
-e "s^@out\@^$out^g" \
|
||||
< $i > $dst
|
||||
chmod +x $dst
|
||||
|
@ -1,7 +1,8 @@
|
||||
{ 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, module_init_tools, hotplug, udev}:
|
||||
, gnutar, gzip, mingetty, grubWrapper, parted, module_init_tools, hotplug
|
||||
, udev, dhcp}:
|
||||
|
||||
derivation {
|
||||
name = "boot";
|
||||
@ -14,5 +15,6 @@ derivation {
|
||||
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 module_init_tools udev;
|
||||
gnutar gnugrep gzip mingetty grubWrapper parted module_init_tools
|
||||
udev dhcp;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
export PATH=@nix@/bin:@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@sysvinit@/bin:@sysvinit@/sbin:@e2fsprogs@/bin:@e2fsprogs@/sbin:@nettools@/bin:@nettools@/sbin:@gcc@/bin:@subversion@/bin:@which@/bin:@wget@/bin:@vim@/bin:@less@/bin:@screen@/bin:@openssh@/bin:@binutils@/bin:@strace@/bin:@shadowutils@/bin:@shadowutils@/sbin:@iputils@/bin:@gnumake@/bin:@curl@/bin:@gnused@/bin:@gnutar@/bin:@gnugrep@/bin:@gzip@/bin:@mingetty@/sbin:@grub@/bin:@grub@/sbin:@module_init_tools@/sbin
|
||||
export PATH=@nix@/bin:@bash@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@sysvinit@/bin:@sysvinit@/sbin:@e2fsprogs@/bin:@e2fsprogs@/sbin:@nettools@/bin:@nettools@/sbin:@gcc@/bin:@subversion@/bin:@which@/bin:@wget@/bin:@vim@/bin:@less@/bin:@screen@/bin:@openssh@/bin:@binutils@/bin:@strace@/bin:@shadowutils@/bin:@shadowutils@/sbin:@iputils@/bin:@gnumake@/bin:@curl@/bin:@gnused@/bin:@gnutar@/bin:@gnugrep@/bin:@gzip@/bin:@mingetty@/sbin:@grub@/bin:@grub@/sbin:@module_init_tools@/sbin:@dhcp@/sbin
|
||||
|
12
fill-disk.sh
12
fill-disk.sh
@ -169,9 +169,9 @@ mknod -m 0600 $root/dev/tty0 c 4 0
|
||||
mknod -m 0600 $root/dev/tty1 c 4 1
|
||||
mknod -m 0444 $root/dev/urandom c 1 9
|
||||
|
||||
touch_file /etc/passwd
|
||||
touch_file /etc/shadow
|
||||
touch_file /etc/group
|
||||
#touch_file /etc/passwd
|
||||
#touch_file /etc/shadow
|
||||
#touch_file /etc/group
|
||||
|
||||
rm -f $root/etc/mtab
|
||||
#ln -s /proc/mounts $root/etc/mtab
|
||||
@ -292,6 +292,12 @@ rm -f $root/etc/hosts
|
||||
echo "127.0.0.1 localhost" >> $root/etc/hosts
|
||||
echo "192.168.150.1 uml" >> $root/etc/hosts
|
||||
|
||||
echo setting up initial account information...
|
||||
|
||||
echo "root:x:0:root" > $root/etc/group
|
||||
echo "root:x:0:0:root:/root:/bin/sh" > $root/etc/passwd
|
||||
echo "root::12757:0:99999:7:::" > $root/etc/shadow
|
||||
|
||||
###
|
||||
### Do kernel stuff here.
|
||||
###
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, module_init_tools, hotplug}:
|
||||
{ stdenv, bash, coreutils, utillinux, e2fsprogs, nix, shadowutils, mingetty, grubWrapper, parted, module_init_tools, hotplug, dhcp}:
|
||||
|
||||
derivation {
|
||||
name = "init";
|
||||
@ -7,5 +7,5 @@ derivation {
|
||||
stage1 = ./prepare-disk.sh;
|
||||
stage2 = ./install-disk.sh;
|
||||
inherit stdenv bash coreutils utillinux e2fsprogs nix shadowutils
|
||||
mingetty grubWrapper parted module_init_tools;
|
||||
mingetty grubWrapper parted module_init_tools dhcp;
|
||||
}
|
||||
|
@ -64,6 +64,7 @@ modutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).module_init_to
|
||||
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 -))
|
||||
udev=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).udev' | $NIX_CMD_PATH/nix-instantiate -))
|
||||
dhcp=$($NIX_CMD_PATH/nix-store -r $(echo '(import ./pkgs.nix).dhcp' | $NIX_CMD_PATH/nix-instantiate -))
|
||||
|
||||
(while read storepath; do
|
||||
cp -fa --parents ${storepath} ${archivesDir}
|
||||
@ -115,6 +116,7 @@ cp -fau --parents ${SysVinit} ${archivesDir}
|
||||
cp -fau --parents ${BootPath} ${archivesDir}
|
||||
cp -fau --parents ${hotplug} ${archivesDir}
|
||||
cp -fau --parents ${udev} ${archivesDir}
|
||||
cp -fau --parents ${dhcp} ${archivesDir}
|
||||
|
||||
bashdeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -)))
|
||||
|
||||
|
11
pkgs.nix
11
pkgs.nix
@ -3,15 +3,18 @@ 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 module_init_tools hotplug udev;
|
||||
mingetty grubWrapper syslinux parted module_init_tools hotplug udev
|
||||
dhcp;
|
||||
|
||||
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 module_init_tools hotplug udev;};
|
||||
gnused gnutar gnugrep gzip mingetty grubWrapper parted module_init_tools
|
||||
hotplug udev dhcp;};
|
||||
|
||||
init = (import ./init) {inherit stdenv bash coreutils
|
||||
utillinux e2fsprogs nix shadowutils mingetty grubWrapper parted module_init_tools hotplug;};
|
||||
init = (import ./init) {inherit stdenv bash coreutils utillinux e2fsprogs
|
||||
nix shadowutils mingetty grubWrapper parted module_init_tools hotplug
|
||||
dhcp;};
|
||||
|
||||
everything = [boot init sysvinit kernel];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user