Fixed issue with paths being remounted
I noticed switching got slower and slower as I kept switching and there were a lot of duplicate directories in my mount output. See: https://discourse.nixos.org/t/duplicate-boot-entries-in-mount-output/26923/
This commit is contained in:
		
							parent
							
								
									00762bbc4e
								
							
						
					
					
						commit
						30832c3ac1
					
				
					 1 changed files with 13 additions and 2 deletions
				
			
		|  | @ -17,10 +17,21 @@ | |||
|   boot.loader.grub.zfsSupport = true; | ||||
|   boot.loader.grub.extraPrepareConfig = '' | ||||
|     mkdir -p /boot/efis | ||||
|     for i in  /boot/efis/*; do mount $i ; done | ||||
|     for i in  /boot/efis/* ; do | ||||
|       (mount | grep -q "$i") | ||||
|       isDirectoryMounted=$? | ||||
|       if (test $isDirectoryMounted -ne 0); then | ||||
|         mount "$i" | ||||
|       fi | ||||
|     done | ||||
| 
 | ||||
|     mkdir -p /boot/efi | ||||
|     # mount /boot/efi | ||||
|     (mount | grep -q /boot/efi) | ||||
|     isDirectoryMounted=$? | ||||
|     if (test $isDirectoryMounted -ne 0); then | ||||
|       mount /boot/efi | ||||
|     fi | ||||
|   ''; | ||||
|   boot.loader.grub.extraInstallCommands = '' | ||||
|     ESP_MIRROR=$(mktemp -d) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue