nixpkgs-suyu/boot/builder.sh
Eelco Dolstra 3514c5658b * Proper sysvinit boot/halt. At runlevel 2, creates login shells at
virtual consoles 0 and 1.  To shutdown, do `init 0' (`halt' and
  `shutdown' don't work because they call /sbin/init).

svn path=/nixu/trunk/; revision=803
2004-02-18 14:56:32 +00:00

20 lines
No EOL
464 B
Bash
Executable file

#! /bin/sh -e
. $stdenv/setup
mkdir $out
mkdir $out/bin
for i in $boot $halt $login; do
dst=$out/bin/$(basename $i | cut -c34-)
sed \
-e "s^@bash\@^$bash^g" \
-e "s^@coreutils\@^$coreutils^g" \
-e "s^@findutils\@^$findutils^g" \
-e "s^@utillinux\@^$utillinux^g" \
-e "s^@sysvinit\@^$sysvinit^g" \
-e "s^@e2fsprogs\@^$e2fsprogs^g" \
-e "s^@nix\@^$nix^g" \
< $i > $dst
chmod +x $dst
done