linuxmuster / linuxmuster-linbo

Linbo imaging system for linuxmuster.net
23 stars 22 forks source link

linbo_cmd function to list all images in cache #165

Closed dorianim closed 3 years ago

dorianim commented 3 years ago

For the "upload image" dialog in the linboGUI I need a function that does the following:

  1. Mount the cache partition
  2. Print all Images that are present in the cache partition (ls /cache/*.cloop)
  3. Unmount the cache partition
  4. Exit 0

I could do this manually, but I am trying to stick to using linbo_cmd as the only interface. Would be nice to get this added :slightly_smiling_face:

HappyBasher commented 3 years ago

Ok, how is this done in the old gui?

dorianim commented 3 years ago

It isn't. The old GUI just lists one image per OS with the name of the os base image. It doesn't care if the images actually exist.

HappyBasher commented 3 years ago

Ah, Ok. Command could be linbo_cmd listimages <cachedev>. Output like ls -1 *.cloop or ls -l *.cloop? Or both controlled by parameter long?

dorianim commented 3 years ago

ls -1 *.cloop is enough. I think the other information that -l provides is irrelevant.

dorianim commented 3 years ago

I implemented this in the GUI using the -1 flag and linbo_cmd listimages <cachedev>