base-files: upgrade: fix initramfs detection
Commit "initramfs: switch to tmpfs to fix ujail" switched initramfs to
now use tmpfs, it causes $(rootfs_type) to now return tmpfs when
running initramfs image instead of being empty.
This broke initramfs detection which prevents config files from
being saved as it does not work from initramfs.
So, lets test for $(rootfs_type) returning "tmpfs" instead.
Fixes: 7fd3c68 ("initramfs: switch to tmpfs to fix ujail)
Signed-off-by: Robert Marko <robimarko@gmail.com>
			
			
This commit is contained in:
		 Robert Marko
					Robert Marko
				
			
				
					committed by
					
						 Daniel Golle
						Daniel Golle
					
				
			
			
				
	
			
			
			 Daniel Golle
						Daniel Golle
					
				
			
						parent
						
							7a181a65f2
						
					
				
				
					commit
					20d847d133
				
			| @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk | |||||||
| include $(INCLUDE_DIR)/feeds.mk | include $(INCLUDE_DIR)/feeds.mk | ||||||
|  |  | ||||||
| PKG_NAME:=base-files | PKG_NAME:=base-files | ||||||
| PKG_RELEASE:=240 | PKG_RELEASE:=241 | ||||||
| PKG_FLAGS:=nonshared | PKG_FLAGS:=nonshared | ||||||
|  |  | ||||||
| PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ | PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ | ||||||
|   | |||||||
| @@ -216,7 +216,7 @@ include /lib/upgrade | |||||||
| do_save_conffiles() { | do_save_conffiles() { | ||||||
| 	local conf_tar="$1" | 	local conf_tar="$1" | ||||||
|  |  | ||||||
| 	[ -z "$(rootfs_type)" ] && { | 	[ "$(rootfs_type)" = "tmpfs" ] && { | ||||||
| 		echo "Cannot save config while running from ramdisk." >&2 | 		echo "Cannot save config while running from ramdisk." >&2 | ||||||
| 		ask_bool 0 "Abort" && exit | 		ask_bool 0 "Abort" && exit | ||||||
| 		rm -f "$conf_tar" | 		rm -f "$conf_tar" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user