Fix uptime detection on NetBSD
This commit is contained in:
		
							parent
							
								
									6ec3280a8d
								
							
						
					
					
						commit
						89f78f023a
					
				@ -224,7 +224,7 @@ If the executable `uptime' is not found, return nil."
 | 
				
			|||||||
    (let ((uptime-str (eshell-info-banner--shell-command-to-string "uptime -p")))
 | 
					    (let ((uptime-str (eshell-info-banner--shell-command-to-string "uptime -p")))
 | 
				
			||||||
      (if (not (seq-some (lambda (keyword)
 | 
					      (if (not (seq-some (lambda (keyword)
 | 
				
			||||||
                           (string-match-p keyword uptime-str))
 | 
					                           (string-match-p keyword uptime-str))
 | 
				
			||||||
                         '("invalid" "illegal")))
 | 
					                         '("invalid" "illegal" "unknown")))
 | 
				
			||||||
          (s-chop-prefix "up " (s-trim uptime-str))
 | 
					          (s-chop-prefix "up " (s-trim uptime-str))
 | 
				
			||||||
        (let ((uptime-str (eshell-info-banner--shell-command-to-string "uptime")))
 | 
					        (let ((uptime-str (eshell-info-banner--shell-command-to-string "uptime")))
 | 
				
			||||||
          (save-match-data
 | 
					          (save-match-data
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user