[RFC] Unify all programs into a single 'ksmbdctl' binary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Namjae, list,

I've been working on the unification of all ksmbd-tools programs into a
single 'ksmbdctl' binary, and I would like to invite everyone to test
and/or provide me feedback on the implementation.

Since this a big-ish refactor, for now I'm sharing the code via my
GitHub repo:

https://github.com/ematsumiya/ksmbd-tools/tree/ksmbdctl

I can split it into smaller commits later on, if approved for merge.

Commit message below, for a better explanation.

Cheers,

Enzo

==================================
commit 1135e0f6b592fb48d6b20b919c44ddb961d0c51d
Author: Enzo Matsumiya <ematsumiya@xxxxxxx>
Date:   Tue Nov 30 15:22:35 2021 -0300

    Unify all programs into a single 'ksmbdctl' binary

    This commit unifies all existing programs
    (ksmbd.{adduser,addshare,control,mountd}) into a single ksmbdctl binary.

    The intention is to make it more like other modern tools (e.g. git,
    nvme, virsh, etc) which have more clear user interface, readable
    commands, and also makes it easier to script.

    Example commands:
      # ksmbdctl share add myshare -o "guest ok=yes, writable=yes, path=/mnt/data"
      # ksmbdctl user add myuser
      # ksmbdctl user add -i $HOME/mysmb.conf anotheruser
      # ksmbdctl daemon start
Besides adding a new "share list" command, any previously working
    functionality shouldn't be affected.

    Basic testing was done manually. Updated README to reflect these
    modifications.

    TODO:
    - run more complex tests in more complext environments
    - implement tests (for each command and subcommand)
    - create an abstract command interface, to make it easier to add/modify
      the commands
    - find and fix obvious bugs I missed

    Signed-off-by: Enzo Matsumiya <ematsumiya@xxxxxxx>




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux