Skip to content

Avoid mount also for regular install ? #14

@afbjorklund

Description

@afbjorklund

Currently the mount command is avoided for the copy only, but not for the regular install command.

This means that it fails, when not running --privileged: mount: permission denied (are you root?)

If you use the same workaround there as well, that would allow running the usual tce-load -wi:

@@ -135,7 +135,7 @@ install(){
 		else
 			[ -d /tmp/tcloop/"$APPNAME" ] || sudo /bin/mkdir -p /tmp/tcloop/"$APPNAME"
 			awk -v appname="/tmp/tcloop/$APPNAME" ' { if ( $2 == appname )  exit 1 }' /etc/mtab
-			[ "$?" == 1 ] || sudo /bin/mount "$THISAPP" /tmp/tcloop/"$APPNAME" -t squashfs -o loop,ro 2>&1
+			[ "$?" == 1 ] || sudo /usr/local/bin/unsquashfs -f -d /tmp/tcloop/"$APPNAME" "$THISAPP" 2>&1 >/dev/null
 			[ "$?" == 0 ] || abort_to_saved_dir
 			[ "`find /tmp/tcloop/${APPNAME} -mindepth 1 -maxdepth 2 | wc -l`" -le 1 ] && EMPTYEXT=1
 
@@ -147,7 +147,7 @@ install(){
 					[ -s /etc/sysconfig/desktop ] && desktop.sh "$APPNAME"
 				fi
 			else
-				sudo /bin/umount -d /tmp/tcloop/"$APPNAME"
+				sudo rm -rf /tmp/tcloop/"$APPNAME"
 				update_system "$THISAPP" "$APPNAME"
 			fi
 		fi

This means that it would work (similar to regular Tiny Core Linux) out-of-the-box...

User can mount a docker volume on /tmp/tcloop, for a more similar experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions