mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Since systemd v239, Exec* binaries are resolved from PATH when they are not-absolute. Switch to this by default for ease of downstream maintenance. Many downstream distributions move individual binaries to locations that existing compile-time configurations cannot accommodate. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Closes #14880
		
			
				
	
	
		
			16 lines
		
	
	
		
			410 B
		
	
	
	
		
			SYSTEMD
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			410 B
		
	
	
	
		
			SYSTEMD
		
	
	
	
	
	
[Unit]
 | 
						|
Description=zpool scrub on %i
 | 
						|
Documentation=man:zpool-scrub(8)
 | 
						|
Requires=zfs.target
 | 
						|
After=zfs.target
 | 
						|
ConditionACPower=true
 | 
						|
ConditionPathIsDirectory=/sys/module/zfs
 | 
						|
 | 
						|
[Service]
 | 
						|
EnvironmentFile=-@initconfdir@/zfs
 | 
						|
ExecStart=sh -c '\
 | 
						|
if zpool status %i | grep -q "scrub in progress"; then\
 | 
						|
exec zpool wait -t scrub %i;\
 | 
						|
else exec zpool scrub -w %i; fi'
 | 
						|
ExecStop=-sh -c 'zpool scrub -p %i 2>/dev/null || true'
 |