;;; -*- Mode:Lisp; Readtable:CL; Package:USER; Base:10; Patch-File:T -*-
;;; Patch file for System version 123.277
;;; Reason:
;;;  Only offer to deconfigure the network on a :system-release garbage collection
;;; Written 11-May-88 20:48:21 by pld (Peter L. DeWolf) at site Gigamos Cambridge
;;; while running on Azathoth from band 3
;;; with Experimental System 123.276, Experimental Local-File 73.5, Experimental FILE-Server 22.5, Experimental Unix-Interface 11.0, Experimental KERMIT 34.3, Experimental ZMail 71.2, Experimental Lambda-Diag 15.0, Experimental Tape 22.4, microcode 1756, SDU Boot Tape 3.14, SDU ROM 8, the old ones.



; From modified file DJ: L.NETWORK.KERNEL; CONFIGURE.LISP#99 at 11-May-88 20:48:22
#10R NETWORK#: 
(COMPILER-LET ((*PACKAGE* (GLOBAL:PKG-FIND-PACKAGE "NETWORK")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: NETWORK; KERNEL; CONFIGURE  "

(defun maybe-deconfigure-network ()
  (when (and (boundp '*loopback-interface*)
	     *loopback-interface*
	     (ni-enabled *loopback-interface*))
    (when (global:with-timeout ((* 30 60.) (progn (write-string "Yes (after timeout)" *query-io*) t))
	    (yes-or-no-p "    Deconfigure network (Yes after thirty seconds) ? "))
      (net:deconfigure)))
  (cleanup))

))

(delete-initialization "Deconfigure Network" '(:full-gc))
(delete-initialization "Leave Network Deconfigured" '(:gc-system-release))
(delete-initialization "Reconfigure Network" '(:after-full-gc))

; From modified file DJ: L.NETWORK.KERNEL; CONFIGURE.LISP#99 at 11-May-88 20:49:42
#10R NETWORK#: 
(COMPILER-LET ((*PACKAGE* (GLOBAL:PKG-FIND-PACKAGE "NETWORK")))
  (COMPILER::PATCH-SOURCE-FILE "SYS: NETWORK; KERNEL; CONFIGURE  "

(add-initialization "Maybe Deconfigure Network" '(maybe-deconfigure-network) '(:gc-system-release))

))
