mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 22:14:42 +00:00
* Fix weird "systemConfig=blabla" errors due to wrong parsing
of the resume= kernel parameter. svn path=/nixos/trunk/; revision=11260
This commit is contained in:
parent
5d7f0e7967
commit
249fc3c135
@ -30,7 +30,6 @@ test -e /etc/fstab || touch /etc/fstab # to shut up mount
|
||||
mkdir -m 0755 -p /proc
|
||||
mount -n -t proc none /proc
|
||||
cat /proc/mounts > /etc/mtab
|
||||
|
||||
mkdir -m 0755 -p /etc/nixos
|
||||
|
||||
|
||||
@ -56,6 +55,10 @@ for o in $(cat /proc/cmdline); do
|
||||
set -- $(IFS==; echo $o)
|
||||
systemConfig=$2
|
||||
;;
|
||||
resume=*)
|
||||
set -- $(IFS==; echo $o)
|
||||
resumeDevice=$2
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -90,6 +93,12 @@ mknod -m 0666 /dev/null c 1 3
|
||||
mknod -m 0644 /dev/urandom c 1 9 # needed for passwd
|
||||
|
||||
|
||||
# Clear the resume device.
|
||||
if test -n "$resumeDevice"; then
|
||||
mkswap "$resumeDevice" || echo 'Failed to clear saved image.'
|
||||
fi
|
||||
|
||||
|
||||
# Run the script that performs all configuration activation that does
|
||||
# not have to be done at boot time.
|
||||
@activateConfiguration@ "$systemConfig"
|
||||
@ -108,13 +117,6 @@ export MODULE_DIR=@kernel@/lib/modules/
|
||||
# Run any user-specified commands.
|
||||
@shell@ @bootLocal@
|
||||
|
||||
resumeDevice="$(cat /proc/cmdline)"
|
||||
resumeDevice="${resumeDevice##* resume=}"
|
||||
resumeDevice="${resumeDevice%% *}"
|
||||
echo "$resumeDevice"
|
||||
if test -n "$resumeDevice"; then
|
||||
mkswap "$resumeDevice" || echo 'Failed to clear saved image.'
|
||||
fi
|
||||
|
||||
# Start Upstart's init. We start it through the
|
||||
# /var/run/current-system symlink indirection so that we can upgrade
|
||||
|
Loading…
Reference in New Issue
Block a user