deal with that stinkin cdist marker thinggy
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								9ad203c744
							
						
					
				
			
			
				commit
				
					
						d05f11b0b8
					
				
			
		
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -20,7 +20,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
get_type_from_mkfs() {
 | 
					get_type_from_mkfs() {
 | 
				
			||||||
   _device="$1"
 | 
					   _device="$1"
 | 
				
			||||||
   for mkfs_object in $(find "$__global/object/__install_mkfs" -path "*.cdist"); do
 | 
					   for mkfs_object in $(find "$__global/object/__install_mkfs" -type d -name "$__cdist_object_marker"); do
 | 
				
			||||||
      mkfs_device="$(cat "$mkfs_object/parameter/device")"
 | 
					      mkfs_device="$(cat "$mkfs_object/parameter/device")"
 | 
				
			||||||
      if [ "$_device" = "$mkfs_device" ]; then
 | 
					      if [ "$_device" = "$mkfs_device" ]; then
 | 
				
			||||||
         cat "$mkfs_object/parameter/type"
 | 
					         cat "$mkfs_object/parameter/type"
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,10 @@ else
 | 
				
			||||||
   # store for later use by others
 | 
					   # store for later use by others
 | 
				
			||||||
   echo "$type" > "$__object/parameter/type"
 | 
					   echo "$type" > "$__object/parameter/type"
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
[ -n "$type" ] || die "Can't determine type for $__object"
 | 
					[ -n "$type" ] || {
 | 
				
			||||||
 | 
					   echo "Can't determine type for $__object" >&2
 | 
				
			||||||
 | 
					   exit 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
if [ "$type" = "swap" ]; then
 | 
					if [ "$type" = "swap" ]; then
 | 
				
			||||||
   echo "swapon \"$device\""
 | 
					   echo "swapon \"$device\""
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue