From e876f67580b1726e67a5630a4a107669fa56ffb3 Mon Sep 17 00:00:00 2001 From: Armijn Hemel Date: Wed, 30 Aug 2006 00:15:02 +0000 Subject: [PATCH] pass nano. Not that it actually works, because it also needs ncurses for terminal information... svn path=/nixu/trunk/; revision=6321 --- fill-disk.sh | 3 +++ login.sh | 2 +- make-disk.sh | 7 +++++-- pkgs.nix | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/fill-disk.sh b/fill-disk.sh index 3cce7aab512..e9e974b3586 100755 --- a/fill-disk.sh +++ b/fill-disk.sh @@ -132,6 +132,9 @@ mknod -m 0600 $root/dev/tty2 c 4 2 mknod -m 0600 $root/dev/tty3 c 4 3 mknod -m 0444 $root/dev/urandom c 1 9 +## needed for sshd and friends. Should actually be made by udev. +mknod -m 0666 $root/dev/ptmx c 5 2 + rm -f $root/etc/mtab ln -s /proc/mounts $root/etc/mtab diff --git a/login.sh b/login.sh index 3a6b9983885..1c33a2ebc91 100644 --- a/login.sh +++ b/login.sh @@ -1,6 +1,6 @@ #! @bash@/bin/sh -e -export PATH=@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@busybox@/bin:@busybox@/sbin +export PATH=@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@busybox@/bin:@busybox@/sbin:@nano@/bin #tty=$1 diff --git a/make-disk.sh b/make-disk.sh index 6866b2a2e87..f263f6d51c6 100755 --- a/make-disk.sh +++ b/make-disk.sh @@ -37,6 +37,8 @@ initscript=$archivesDir/scripts/init.sh nix=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).nixUnstable' | $NIX/nix-instantiate -)) busybox=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).busybox' | $NIX/nix-instantiate -)) +nano=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).nano' | $NIX/nix-instantiate -)) +nanoDiet=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).nanoDiet' | $NIX/nix-instantiate -)) nixDeps=$($NIX/nix-store -qR $nix) @@ -80,7 +82,7 @@ modutils=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).module_init_toolsStatic dhcp=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).dhcpWrapper' | $NIX/nix-instantiate -)) #combideps=$($NIX/nix-store -qR $nix $utillinux $gnugrep $grub $gzip $findutils) -combideps=$($NIX/nix-store -qR $nix $busybox $grub $findutils $modutils $dhcp) +combideps=$($NIX/nix-store -qR $nix $busybox $grub $findutils $modutils $dhcp $nano) for i in $storeExpr $mkinitrd do @@ -128,7 +130,6 @@ modutils=$($NIX/nix-store -q $(echo '(import ./pkgs.nix).module_init_toolsStatic grub=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).grubWrapper' | $NIX/nix-instantiate -)) mingettyWrapper=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).mingettyWrapper' | $NIX/nix-instantiate -)) dhcp=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).dhcpWrapper' | $NIX/nix-instantiate -)) -nano=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).nano' | $NIX/nix-instantiate -)) gnugrep=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).gnugrep' | $NIX/nix-instantiate -)) which=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).which' | $NIX/nix-instantiate -)) eject=$($NIX/nix-store -r $(echo '(import ./pkgs.nix).eject' | $NIX/nix-instantiate -)) @@ -237,6 +238,7 @@ $gnused/bin/sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \ -e "s^@gnutar\@^$gnutar^g" \ -e "s^@mingetty\@^$mingettyWrapper^g" \ -e "s^@busybox\@^$busybox^g" \ + -e "s^@nano\@^$nanoDiet^g" \ < $login_script > $login_script.tmp $coreutils/bin/mv $login_script.tmp $login_script @@ -306,6 +308,7 @@ $coreutils/bin/cp -fau --parents ${modutils}/bin ${initdir} $coreutils/bin/chmod -R u+w ${initdir} $coreutils/bin/cp -fau --parents ${modutils}/sbin ${initdir} $coreutils/bin/cp -fau --parents ${busybox} ${initdir} +$coreutils/bin/cp -fau --parents ${nanoDiet} ${initdir} $coreutils/bin/touch ${archivesDir}/NIXOS diff --git a/pkgs.nix b/pkgs.nix index 41efb92c99e..f202283eecc 100644 --- a/pkgs.nix +++ b/pkgs.nix @@ -5,8 +5,8 @@ rec { e2fsprogs nettools nixUnstable subversion gcc wget which vim less screen openssh binutils nixStatic strace shadowutils iputils gnumake curl gnused gnutar gnugrep gzip mingettyWrapper grubWrapper syslinux parted - module_init_tools module_init_toolsStatic dhcpWrapper man nano eject - sysklogd mktemp cdrtools cpio busybox mkinitrd; + module_init_tools module_init_toolsStatic dhcpWrapper man nano nanoDiet + eject sysklogd mktemp cdrtools cpio busybox mkinitrd; boot = (import ./boot) { inherit stdenv bash coreutils findutilsWrapper utillinux sysvinit