Manage crypttab only if LUKS is present
This commit is contained in:
		
							parent
							
								
									a1bee64ed5
								
							
						
					
					
						commit
						8306a9c454
					
				|  | @ -235,9 +235,11 @@ mountpoint -q /target/run/udev   || mount --bind      -- /run/udev /target/run/u | ||||||
| ### }}} | ### }}} | ||||||
| ## }}} | ## }}} | ||||||
| ## Luks {{{ | ## Luks {{{ | ||||||
| luks_part_uuid=$(blkid | grep "${hdd}2.*TYPE=\"crypto_LUKS\"" | sed 's/.*UUID="\(.*\)" TYPE.*/\1/') | if [ "${manage_luks}" -eq 0 ]; then | ||||||
| ### Ensure crypttab file contains the LUKS informations | 	luks_part_uuid=$(blkid | grep "${hdd}2.*TYPE=\"crypto_LUKS\"" | sed 's/.*UUID="\(.*\)" TYPE.*/\1/') | ||||||
| printf '%b\n' "${luks_pv_name} UUID=${luks_part_uuid} none luks,discard" >> /target/etc/crypttab | 	### Ensure crypttab file contains the LUKS informations | ||||||
|  | 	printf '%b\n' "${luks_pv_name} UUID=${luks_part_uuid} none luks,discard" >> /target/etc/crypttab | ||||||
|  | fi | ||||||
| 
 | 
 | ||||||
| ### Regenerate initramfs | ### Regenerate initramfs | ||||||
| chroot /target update-initramfs -k all -u | chroot /target update-initramfs -k all -u | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue