From 484a2b3a5ac7337e5d3b8773f6ce8c356b72742b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 24 May 2014 15:51:57 +0200 Subject: system: Separate the activation script from the boot script. * gnu/system.scm (operating-system-activation-script): New procedure, containing most of the former 'operating-system-boot-script'. (operating-system-boot-script): Call it, and 'primitive-load' its result. * guix/build/activation.scm (%booted-system): Remove. (activate-current-system): Remove #:boot? parameter and related code. --- guix/build/activation.scm | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'guix/build') diff --git a/guix/build/activation.scm b/guix/build/activation.scm index 49f98c021d..62e69a9152 100644 --- a/guix/build/activation.scm +++ b/guix/build/activation.scm @@ -197,29 +197,19 @@ (define (make-setuid-program prog) (for-each make-setuid-program programs)) -(define %booted-system - ;; The system we booted in (a symlink.) - "/run/booted-system") - (define %current-system ;; The system that is current (a symlink.) This is not necessarily the same - ;; as %BOOTED-SYSTEM, for instance because we can re-build a new system - ;; configuration and activate it, without rebooting. + ;; as the system we booted (aka. /run/booted-system) because we can re-build + ;; a new system configuration and activate it, without rebooting. "/run/current-system") (define (boot-time-system) "Return the '--system' argument passed on the kernel command line." (find-long-option "--system" (linux-command-line))) -(define* (activate-current-system #:optional (system (boot-time-system)) - #:key boot?) - "Atomically make SYSTEM the current system. When BOOT? is true, also make -it the booted system." +(define* (activate-current-system #:optional (system (boot-time-system))) + "Atomically make SYSTEM the current system." (format #t "making '~a' the current system...~%" system) - (when boot? - (when (file-exists? %booted-system) - (delete-file %booted-system)) - (symlink system %booted-system)) ;; Atomically make SYSTEM current. (let ((new (string-append %current-system ".new"))) -- cgit v1.2.3