From ffe45949e8fa0acc58ce1b873dcb8a542b8dee6c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 9 Aug 2008 12:03:08 +0000 Subject: [PATCH] * Use the right mount command in the filesystems job so that NTFS-3G works properly. svn path=/nixos/trunk/; revision=12565 --- system/options.nix | 4 +++- system/system.nix | 2 +- upstart-jobs/default.nix | 3 ++- upstart-jobs/filesystems.nix | 10 +++++----- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/system/options.nix b/system/options.nix index 70f7bcb5faf9..1f4b13300ca5 100644 --- a/system/options.nix +++ b/system/options.nix @@ -371,7 +371,9 @@ in extraHosts = mkOption { default = ""; example = "192.168.0.1 lanlocalhost"; - description = "Pasted verbatim into /etc/hosts."; + description = '' + Additional entries to be appended to /etc/hosts. + ''; }; useDHCP = mkOption { diff --git a/system/system.nix b/system/system.nix index 5f957b7634a3..a5059797735e 100644 --- a/system/system.nix +++ b/system/system.nix @@ -108,7 +108,7 @@ rec { # The services (Upstart) configuration for the system. upstartJobs = import ../upstart-jobs/default.nix { inherit config pkgs nix modprobe nssModulesPath nixEnvVars - optionDeclarations kernelPackages; + optionDeclarations kernelPackages mount; }; diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix index fb2e6f5ed600..4957482ae9e2 100644 --- a/upstart-jobs/default.nix +++ b/upstart-jobs/default.nix @@ -1,4 +1,4 @@ -{config, pkgs, nix, modprobe, nssModulesPath, nixEnvVars, optionDeclarations, kernelPackages}: +{config, pkgs, nix, modprobe, nssModulesPath, nixEnvVars, optionDeclarations, kernelPackages, mount}: let @@ -118,6 +118,7 @@ let # Mount file systems. (import ../upstart-jobs/filesystems.nix { + inherit mount; inherit (pkgs) utillinux e2fsprogs; fileSystems = config.fileSystems; }) diff --git a/upstart-jobs/filesystems.nix b/upstart-jobs/filesystems.nix index 1713f6c098a3..24569db11b48 100644 --- a/upstart-jobs/filesystems.nix +++ b/upstart-jobs/filesystems.nix @@ -1,4 +1,4 @@ -{utillinux, e2fsprogs, fileSystems}: +{utillinux, e2fsprogs, fileSystems, mount}: let @@ -61,7 +61,7 @@ script # remount to change the options but nothing else. if cat /proc/mounts | grep -F -q \" $mountPoint \"; then echo \"remounting $device on $mountPoint\" - ${utillinux}/bin/mount -t \"$fsType\" \\ + ${mount}/bin/mount -t \"$fsType\" \\ -o remount,\"$options\" \\ \"$device\" \"$mountPoint\" || true continue @@ -84,7 +84,7 @@ script if test \"$prevMountPoint\" = \"$mountPoint\"; then echo \"remounting $device on $mountPoint\" - ${utillinux}/bin/mount -t \"$fsType\" \\ + ${mount}/bin/mount -t \"$fsType\" \\ -o remount,\"$options\" \\ \"$device\" \"$mountPoint\" || true continue @@ -92,7 +92,7 @@ script if test -n \"$prevMountPoint\"; then echo \"unmount $device from $prevMountPoint\" - ${utillinux}/bin/umount \"$prevMountPoint\" || true + ${mount}/bin/umount \"$prevMountPoint\" || true fi fi @@ -106,7 +106,7 @@ script if test \"\$autocreate\" = 1; then mkdir -p \"\$mountPoint\"; fi - if ${utillinux}/bin/mount -t \"$fsType\" -o \"$options\" \"$device\" \"$mountPoint\"; then + if ${mount}/bin/mount -t \"$fsType\" -o \"$options\" \"$device\" \"$mountPoint\"; then newDevices=1 fi