mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	 83ba91adf6
			
		
	
	
		83ba91adf6
		
			
		
	
	
	
	
		
			
			Turns out $ZPOOL_IMPORT_OPTS expands in a shell-like fashion,
yielding 'import' '-aN' '-o' 'cachefile=none' for an unset variable,
and 'import' '-aN' '-o' 'cachefile=none' 'word1' 'word2' for a
white-spaced one, but ${ZPOOL_IMPORT_OPTS} expands like "${Z_I_O}"
would in a shell, yielding 'import' '-aN' '-o' 'cachefile=none' ''
(empty) and 'import' '-aN' '-o' 'cachefile=none' 'word1 word2' (spaced)
Fixes eec5ba113e "dracut: 90zfs: respect
zfs_force=1 on systemd systems"
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes: #12231
		
	
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			539 B
		
	
	
	
		
			SYSTEMD
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			539 B
		
	
	
	
		
			SYSTEMD
		
	
	
	
	
	
| [Unit]
 | |
| Description=Import ZFS pools by cache file
 | |
| Documentation=man:zpool(8)
 | |
| DefaultDependencies=no
 | |
| Requires=systemd-udev-settle.service
 | |
| After=systemd-udev-settle.service
 | |
| After=cryptsetup.target
 | |
| After=multipathd.target
 | |
| After=systemd-remount-fs.service
 | |
| Before=zfs-import.target
 | |
| ConditionFileNotEmpty=@sysconfdir@/zfs/zpool.cache
 | |
| ConditionPathIsDirectory=/sys/module/zfs
 | |
| 
 | |
| [Service]
 | |
| Type=oneshot
 | |
| RemainAfterExit=yes
 | |
| ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS
 | |
| 
 | |
| [Install]
 | |
| WantedBy=zfs-import.target
 |