Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid mount also for regular install ? #14

Open
afbjorklund opened this issue Jan 13, 2021 · 0 comments
Open

Avoid mount also for regular install ? #14

afbjorklund opened this issue Jan 13, 2021 · 0 comments

Comments

@afbjorklund
Copy link

afbjorklund commented Jan 13, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant