mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	contrib/initrd: systemd-ask-password --no-tty before argument
In systemd 249 (sid), sd-a-p processes its arguments in getopt + mode,
so "systemd-ask-password zupa --no-tty" prompts for "zupa --no-tty",
not "zupa" not on the tty, as expected (bullseye, 247).
Ref: 4b1c842d95
Ref: https://github.com/systemd/systemd/pull/19806
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12870
			
			
This commit is contained in:
		
							parent
							
								
									f9baf968b8
								
							
						
					
					
						commit
						19a4bf445f
					
				| @ -45,7 +45,7 @@ if [ "$(zpool list -H -o feature@encryption "${BOOTFS%%/*}")" = 'active' ]; then | |||||||
|         case "${KEYLOCATION%%://*}" in |         case "${KEYLOCATION%%://*}" in | ||||||
|             prompt) |             prompt) | ||||||
|                 for _ in 1 2 3; do |                 for _ in 1 2 3; do | ||||||
|                     systemd-ask-password "Encrypted ZFS password for ${BOOTFS}" --no-tty | zfs load-key "${ENCRYPTIONROOT}" && break |                     systemd-ask-password --no-tty "Encrypted ZFS password for ${BOOTFS}" | zfs load-key "${ENCRYPTIONROOT}" && break | ||||||
|                 done |                 done | ||||||
|                 ;; |                 ;; | ||||||
|             http*) |             http*) | ||||||
|  | |||||||
| @ -420,7 +420,7 @@ decrypt_fs() | |||||||
| 			elif [ -e /run/systemd/system ]; then | 			elif [ -e /run/systemd/system ]; then | ||||||
| 				echo "systemd-ask-password" > /run/zfs_console_askpwd_cmd | 				echo "systemd-ask-password" > /run/zfs_console_askpwd_cmd | ||||||
| 				for _ in 1 2 3; do | 				for _ in 1 2 3; do | ||||||
| 					systemd-ask-password "Encrypted ZFS password for ${ENCRYPTIONROOT}" --no-tty | \ | 					systemd-ask-password --no-tty "Encrypted ZFS password for ${ENCRYPTIONROOT}" | \ | ||||||
| 						$ZFS load-key "${ENCRYPTIONROOT}" && break | 						$ZFS load-key "${ENCRYPTIONROOT}" && break | ||||||
| 				done | 				done | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 наб
						наб