3
0
Fork 0
forked from mirrors/nixpkgs

some more tweaks. Enable extra logins on tty2 and tty3. Default root password

is empty.

svn path=/nixu/trunk/; revision=4429
This commit is contained in:
Armijn Hemel 2005-12-24 21:15:24 +00:00
parent fe355bba78
commit d124bd9434
2 changed files with 24 additions and 14 deletions

View file

@ -1,6 +1,6 @@
#! @bash@/bin/sh -e
export PATH=@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@utilLinux@/bin:@utilLinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@eject@/bin:@kudzu@/sbin
export PATH=/bin:/sbin:@bash@/bin:@coreutilsdiet@/bin:@coreutils@/bin:@findutils@/bin:@utillinux@/bin:@utillinux@/sbin:@utilLinux@/bin:@utilLinux@/sbin:@e2fsprogs@/sbin:@grub@/sbin:@sysvinitPath@/sbin:@gnugrep@/bin:@which@/bin:@gnutar@/bin:@eject@/bin:@kudzu@/sbin
##
## In the beginning we want to have a minimalistic environment, built with
@ -236,6 +236,8 @@ echo bringing up networking...
nic=`kudzu -p | grep eth | sort | uniq | cut -d ' ' -f 2`
echo "NIC: $nic"
echo initialising Nix DB...
$NIX_CMD_PATH/nix-store --init
@ -285,7 +287,7 @@ echo setting init symlink...
rm -f $root/init
#ln -s $sysvinitPath/sbin/init $root/init
ln -s @sysvinitPath@/sbin/init $root/sbin/init
ln -s @bash@/bin/sh $root/bin/sh
ln -s @bashGlibc@/bin/sh $root/bin/sh
#ln -s @bash@/bin/bash $root/bin/bash
echo setting up inittab...
@ -294,7 +296,8 @@ echo "id:2:initdefault:" >> $root/etc/inittab
echo "si::bootwait:$bootPath/bin/boot.sh" >> $root/etc/inittab
echo "ht:06:wait:$bootPath/bin/halt.sh" >> $root/etc/inittab
echo "1:2345:respawn:$bootPath/bin/login.sh /dev/tty1" >> $root/etc/inittab
echo "#2:2345:respawn:$mingetty/sbin/mingetty tty2" >> $root/etc/inittab
echo "2:2345:respawn:$mingetty/sbin/mingetty tty2" >> $root/etc/inittab
echo "3:2345:respawn:$mingetty/sbin/mingetty tty3" >> $root/etc/inittab
#echo "2:2345:respawn:$bootPath/bin/login.sh /dev/ttys/1" >> $root/etc/inittab
echo setting up networking information...
@ -307,6 +310,7 @@ echo "127.0.0.1 localhost" >> $root/etc/hosts
echo storing hardware information...
kudzu -p > $root/etc/sysconfig/hwconf
#cp /etc/modprobe.conf $root/etc/
echo setting up initial account information...
@ -320,6 +324,8 @@ echo "sshd:!!:12757:0:99999:7:::" >> $root/etc/shadow
echo default profile for root
echo "source @nix@/etc/profile.d/nix.sh" > $root/root/.profile
touch_file /etc/login.defs
###
### Do kernel stuff here.
###

View file

@ -64,7 +64,7 @@ Kernel=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).
SysVinit=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).sysvinit' | $NIX_CMD_PATH/nix-instantiate -)))
BootPath=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).boot' | $NIX_CMD_PATH/nix-instantiate -)))
#bash=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -))
bashGlibc=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).bash' | $NIX_CMD_PATH/nix-instantiate -))
bash=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).bashStatic' | $NIX_CMD_PATH/nix-instantiate -))
coreutilsdiet=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).coreutilsDiet' | $NIX_CMD_PATH/nix-instantiate -))
coreutils=$($NIX_CMD_PATH/nix-store -q $(echo '(import ./pkgs.nix).coreutils' | $NIX_CMD_PATH/nix-instantiate -))
@ -124,6 +124,7 @@ echo copying nixpkgs
#svn export ${nixpkgs} ${archivesDir}/pkgs
cp -fa ${nixpkgs} ${archivesDir}
#tar cf $archivesDir
#echo copying packages from store
@ -141,8 +142,6 @@ cp -fa ${nixpkgs} ${archivesDir}
#cp -fvau --parents ${nano} ${archivesDir}
#cp -fvau --parents ${gnutar} ${archivesDir}
bashdeps=$($NIX_CMD_PATH/nix-store -qR $(nix-store -r $(echo '(import ./pkgs.nix).bashStatic' | $NIX_CMD_PATH/nix-instantiate -)))
echo copying scripts
mkdir ${archivesDir}/scripts
@ -155,6 +154,7 @@ sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
-e "s^@bootPath\@^$bootPath^g" \
-e "s^@nix\@^$nix^g" \
-e "s^@bash\@^$bash^g" \
-e "s^@bashGlibc\@^$bashGlibc^g" \
-e "s^@findutils\@^$findutils^g" \
-e "s^@coreutilsdiet\@^$coreutilsdiet^g" \
-e "s^@coreutils\@^$coreutils^g" \
@ -223,20 +223,24 @@ cp ${bash}/bin/bash ${initdir}/bin/sh
chmod u+x ${initdir}/init
chmod u+x ${initdir}/fill-disk.sh
chmod u+x ${initdir}/ramdisk-login.sh
#cp -fau --parents ${bashdeps} ${initdir}
#cp -fau --parents ${utilLinux} ${initdir}
#cp -fau --parents ${coreUtilsDiet} ${initdir}
#cp -fau --parents ${e2fsProgs} ${initdir}
#cp -fau --parents ${modUtils} ${initdir}
#cp -fau --parents ${hotplug} ${initdir}
cp -fau --parents ${bash} ${initdir}
cp -fau --parents ${utilLinux} ${initdir}
cp -fau --parents ${coreutilsdiet} ${initdir}
cp -fau --parents ${e2fsprogs} ${initdir}
cp -fau --parents ${modutils} ${initdir}
cp -fau --parents ${hotplug} ${initdir}
cp -fau --parents ${bash}/bin ${initdir}
cp -fau --parents ${utilLinux}/bin ${initdir}
chmod -R u+w ${initdir}
cp -fau --parents ${utilLinux}/sbin ${initdir}
cp -fau --parents ${coreutilsdiet}/bin ${initdir}
cp -fau --parents ${e2fsprogs}/bin ${initdir}
chmod -R u+w ${initdir}
cp -fau --parents ${e2fsprogs}/sbin ${initdir}
cp -fau --parents ${modutils}/bin ${initdir}
chmod -R u+w ${initdir}
cp -fau --parents ${modutils}/sbin ${initdir}
#cp -fau --parents ${hotplug} ${initdir}
#cp -fau --parents ${kudzu} ${initdir}
#cp -fau --parents ${eject} ${initdir}
touch ${archivesDir}/NIXOS