Merge branch 'master' into staging
Conflicts (simple): pkgs/development/lisp-modules/clwrapper/setup-hook.sh
This commit is contained in:
@@ -122,6 +122,9 @@ for o in $(cat /proc/cmdline); do
|
||||
esac
|
||||
done
|
||||
|
||||
# Set hostid before modules are loaded.
|
||||
# This is needed by the spl/zfs modules.
|
||||
@setHostId@
|
||||
|
||||
# Load the required kernel modules.
|
||||
mkdir -p /lib
|
||||
@@ -398,7 +401,7 @@ echo /sbin/modprobe > /proc/sys/kernel/modprobe
|
||||
# Start stage 2. `switch_root' deletes all files in the ramfs on the
|
||||
# current root. Note that $stage2Init might be an absolute symlink,
|
||||
# in which case "-e" won't work because we're not in the chroot yet.
|
||||
if ! test -e "$targetRoot/$stage2Init" -o -L "$targetRoot/$stage2Init"; then
|
||||
if ! test -e "$targetRoot/$stage2Init" -o ! -L "$targetRoot/$stage2Init"; then
|
||||
echo "stage 2 init script ($targetRoot/$stage2Init) not found"
|
||||
fail
|
||||
fi
|
||||
|
||||
@@ -190,6 +190,15 @@ let
|
||||
fsInfo =
|
||||
let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ];
|
||||
in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems));
|
||||
|
||||
setHostId = optionalString (config.networking.hostId != null) ''
|
||||
hi="${config.networking.hostId}"
|
||||
${if pkgs.stdenv.isBigEndian then ''
|
||||
echo -ne "\x''${hi:0:2}\x''${hi:2:2}\x''${hi:4:2}\x''${hi:6:2}" > /etc/hostid
|
||||
'' else ''
|
||||
echo -ne "\x''${hi:6:2}\x''${hi:4:2}\x''${hi:2:2}\x''${hi:0:2}" > /etc/hostid
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user