SynoCommunity - SynoCLI Filetools - mc not working?

Currently reading
SynoCommunity - SynoCLI Filetools - mc not working?

11
3
NAS
DS3617xs
Operating system
  1. macOS
Mobile operating system
  1. iOS
In search of a few useful utilities missing on my NAS such as Nano and Midnighgt Commander, I stumbled across SynoCommunity.

There I found SynoCLI Filetools, including among others, Nano and MC.

All utilities work - apart from mc. It's simply not recognized as a command.

Anyone have this working?
 
It seems like something is wrong with the installer ( /var/packages/synocli-file/scripts/installer). The commands to create the symlinks are located in the file /var/packages/synocli-file/scripts/service-setup, which is sourced in installer, the service_postinst() function from service-setup is called in installer's postinst() function... which is called by nothing?! Not sure though if the package management itself sources the installer file and calls the functions from somewhere else. At least it is safe to say: something didn't work right.

You can either create your own symlinks or call mc with it's absolute path ( /var/packages/synocli-file/target/bin/mc )... who the hell uses mc anyways?!

You might want to check sudo synogear list on the shell. It provides many binaries that are missing on the ds. I installed it because of tmux, lsof and the replacement for top:)
 
Thanks - this is the second time in two days that you have aided me - I will need to buy you a beer or coffee or somehow express my gratitude not just in words :)

LOL @ Midnight Commander - well, maybe I'm a dinosaur but I come from unRAID and it has proven invaluable to me in that environment many times :)

I will definitely check out synogear,
 
Follow-up question: Where would I need to place the symlink for mc to be available when in CLI? usr/bin or usr/local/bin - what is best practice?
 
Last edited:
Btw I discoverd what caused the missing symlink for mc. In the service-setup function sercice_postinst() the symlinks for mc are only created, if the file mc-utf8 exist, which it didn't.

I modified /var/packages/synocli-file/scripts/start-stop-status to look like this:
Code:
#!/bin/sh
SYNOPKG_PKGDEST=$(readlink /var/packages/synocli-file/target)
# fix missing file mc-utf8
if [ ! -e ${SYNOPKG_PKGDEST}/bin/mc-utf8 ];then
  pushd ${SYNOPKG_PKGDEST}/bin
  ln -s mc mc-utf8
  popd
fi
. $(dirname $0)/service-setup

case $1 in
    start)
        service_postinst
        exit 0
        ;;
    stop)
        service_postuninst
        exit 0
        ;;
    status)
        exit 0
        ;;
    log)
        exit 1
        ;;
    *)
        exit 1
        ;;
esac

and then executed it with: bash start-stop-status start. From now on the symlinks will be created whenever the package is started and deleted when the package stops. This is the behavior most other packes have as well.
 
Btw I discoverd what caused the missing symlink for mc. In the service-setup function sercice_postinst() the symlinks for mc are only created, if the file mc-utf8 exist, which it didn't.

I modified /var/packages/synocli-file/scripts/start-stop-status to look like this:
Code:
#!/bin/sh
SYNOPKG_PKGDEST=$(readlink /var/packages/synocli-file/target)
# fix missing file mc-utf8
if [ ! -e ${SYNOPKG_PKGDEST}/bin/mc-utf8 ];then
  pushd ${SYNOPKG_PKGDEST}/bin
  ln -s mc mc-utf8
  popd
fi
. $(dirname $0)/service-setup

case $1 in
    start)
        service_postinst
        exit 0
        ;;
    stop)
        service_postuninst
        exit 0
        ;;
    status)
        exit 0
        ;;
    log)
        exit 1
        ;;
    *)
        exit 1
        ;;
esac

and then executed it with: bash start-stop-status start. From now on the symlinks will be created whenever the package is started and deleted when the package stops. This is the behavior most other packes have as well.

Do you mind if I log this as an issue and suggest your remedy, for the package on github? Will of course credit you!
I just think others might benefit so it should be logged.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
You could build your own: https://github.com/SynoCommunity/spksrc Or they may be able to advise on their...
Replies
1
Views
1,467
  • Solved
DS918+, I assume the x86_64 based NAS models are more common these days
Replies
10
Views
2,928
Exactly this. The track is good. But the problem is that they are getting less and less apps inside it...
Replies
1
Views
3,514
Since docker hit the scene in 2015 on Syno I gave up on SynoCommunity. Not what it used to be also... but...
Replies
5
Views
5,695

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top