mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
* Fixed some installer bugs.
svn path=/nixos/trunk/; revision=7629
This commit is contained in:
parent
158c303e2f
commit
c7c16f384a
@ -1,7 +1,7 @@
|
||||
rec {
|
||||
|
||||
|
||||
nixpkgsRel = "nixpkgs-0.11pre7593";
|
||||
nixpkgsRel = "nixpkgs-0.11pre7628";
|
||||
|
||||
|
||||
configuration = {
|
||||
@ -94,7 +94,7 @@ rec {
|
||||
# Get a recent copy of Nixpkgs.
|
||||
nixpkgsTarball = pkgs.fetchurl {
|
||||
url = configuration.installer.nixpkgsURL + "/" + nixpkgsRel + ".tar.bz2";
|
||||
md5 = "fd443fb8b1c4d352d9a8b7d19dfb7c49";
|
||||
md5 = "e7fe1793e69ff5072eb5987e7b7ccd47";
|
||||
};
|
||||
|
||||
|
||||
|
@ -19,11 +19,27 @@ mountPoint="$1"
|
||||
nixosDir="$2"
|
||||
configuration="$3"
|
||||
|
||||
if test ! -e "$mountPoint" -o ! -e "$nixosDir" -o ! -e "$configuration"; then
|
||||
if test -z "$mountPoint" -o -z "$nixosDir" -o -z "$configuration"; then
|
||||
echo "Syntax: installer.sh <targetRootDir> <nixosDir> <configuration>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! test -e "$mountPoint"; then
|
||||
echo "mount point $mountPoint doesn't exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! test -e "$nixosDir"; then
|
||||
echo "NixOS source directory $nixosDir doesn't exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! test -e "$configuration"; then
|
||||
echo "configuration file $configuration doesn't exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
nixosDir=$(readlink -f "$nixosDir")
|
||||
configuration=$(readlink -f "$configuration")
|
||||
|
||||
@ -124,8 +140,9 @@ mkdir -p $(dirname $targetConfig)
|
||||
if test -e $targetConfig -o -L $targetConfig; then
|
||||
cp -f $targetConfig $targetConfig.backup-$(date "+%Y%m%d%H%M%S")
|
||||
fi
|
||||
if
|
||||
cp -f $configuration $targetConfig
|
||||
if test "$configuration" != "$targetConfig"; then
|
||||
cp -f $configuration $targetConfig
|
||||
fi
|
||||
|
||||
|
||||
# Grub needs a mtab.
|
||||
|
@ -155,6 +155,7 @@ rec {
|
||||
pkgs.less
|
||||
pkgs.lvm2
|
||||
pkgs.man
|
||||
pkgs.mdadm
|
||||
pkgs.module_init_tools
|
||||
pkgs.nano
|
||||
pkgs.netcat
|
||||
|
Loading…
Reference in New Issue
Block a user