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