add logging capabilities. Install log is now copied to /root/install-log.
svn path=/nixu/trunk/; revision=3759
This commit is contained in:
parent
d227f0e83a
commit
14b2ad157c
3 changed files with 16 additions and 1 deletions
|
@ -337,6 +337,10 @@ title NixOS
|
|||
kernel @kernel@/vmlinuz root=$device
|
||||
GRUBEND
|
||||
|
||||
echo copying install log
|
||||
|
||||
cp /tmp/install-log $root/root
|
||||
|
||||
echo umounting filesystem
|
||||
|
||||
umount $root
|
||||
|
|
3
init.sh
Normal file
3
init.sh
Normal file
|
@ -0,0 +1,3 @@
|
|||
#! @bash@/bin/sh -e
|
||||
|
||||
exec ./fill-disk.sh | @coreutils@/bin/tee /tmp/install-log
|
10
make-disk.sh
10
make-disk.sh
|
@ -12,6 +12,7 @@ validatePaths=$archivesDir/validatepaths
|
|||
bootiso=/tmp/nixos.iso
|
||||
initrd=/tmp/initram.img
|
||||
initdir=${archivesDir}/initdir
|
||||
initscript=$archivesDir/scripts/init.sh
|
||||
|
||||
echo cleaning old build
|
||||
|
||||
|
@ -147,6 +148,10 @@ echo copying scripts
|
|||
|
||||
mkdir ${archivesDir}/scripts
|
||||
cp -fa * ${archivesDir}/scripts
|
||||
sed -e "s^@bash\@^$bash^g" \
|
||||
-e "s^@coreutils\@^$coreutilsdiet^g" \
|
||||
< $initscript > $initscript.tmp
|
||||
mv $initscript.tmp $initscript
|
||||
sed -e "s^@sysvinitPath\@^$sysvinitPath^g" \
|
||||
-e "s^@bootPath\@^$bootPath^g" \
|
||||
-e "s^@NIX_CMD_PATH\@^$nix^g" \
|
||||
|
@ -183,9 +188,12 @@ cp -L $kernel/vmlinuz ${archivesDir}/isolinux
|
|||
echo creating ramdisk
|
||||
|
||||
rm -f ${initrd}
|
||||
cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/init
|
||||
#cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/init
|
||||
cp ${archivesDir}/scripts/fill-disk.sh ${initdir}/
|
||||
cp ${archivesDir}/scripts/init.sh ${initdir}/init
|
||||
ln -s ${bash}/bin/bash ${initdir}/bin/sh
|
||||
chmod u+x ${initdir}/init
|
||||
chmod u+x ${initdir}/fill-disk.sh
|
||||
cp -fau --parents ${bashdeps} ${initdir}
|
||||
cp -fau --parents ${utilLinux} ${initdir}
|
||||
cp -fau --parents ${coreUtilsDiet} ${initdir}
|
||||
|
|
Loading…
Reference in a new issue