بلوک عملکرد FS_SHELL

بلوک عملکرد FS_SHELL یک یا چند دستور دور را در یک شل تفاعلی اجرا می‌کند.

توجه: دستورهای سیستم ممکن است سیستم دور را تهدید یا آسیب بزنند. علاوه بر این، فایل‌های موجود ممکن است بدون هشدار overwrite شوند.

سیستم فایل قبلاً باید با استفاده از FS_INIT 初始isiert worden sein. All operations are performed asynchronously per storage medium created.

ورودی RUN

در یک لبه مثبت، دستور مشخص شده اجرا می‌شود.

ورودی DEV

دستگاه را تعریف می‌کند که از آن باید به فایل‌ها دسترسی داشته باشیم. دستگاه در پروژه استفاده می‌شود و می‌تواند در منوی کنTEXT unter پروژه ذخیره‌سازی خارجی managed werden.

ورودی PATH

مسیر به دایرکتوری در رسانه ذخیره‌سازی را مشخص می‌کند. مسیر با یک Unix-Dateipfad im UTF-8 Format entspricht, falls dieses unterstützt wird. Der Pfad wird wie folgt dargestellt:

Ordner/Unterordner

استفاده از یک مسیر اختیاری است. اگر این مقدار تنظیم شده باشد، باید به این دایرکتوری تغییر داده شود، در غیر این صورت دستور برای اجرا انتخاب نمی‌شود.

ورودی CMD

همه دستورهایی که باید اجرا شوند را تعریف می‌کند. همه دستورها باید با یک خط پایان ختم شوند. مانند: "ls\n". اگر خط پایان استفاده نشود، احتمالاً دستور اجرا نمی‌شود. دستورها پس از پاسخ سرور خط به خط اجرا می‌شوند.

پس از اجرای همه دستورها باید در آخر یک "exit\n" ارسال شود تا اتصال فوراً قطع شود و مقادیر برگشت داده شوند. پس از آن نباید دستور دیگری ارسال شود، زیرا در غیر این صورت خروجی ERROR به TRUE تنظیم می‌شود.

نکته: اگر اتصال ناگهان قطع شود و یک دستور ارسال نشود، خروجی ERROR به TRUE تنظیم می‌شود.

ورودی PTY

نوع کنسول (Pseudo-Terminal) را تعریف می‌کند. برای برخی دستگاه‌ها این پارامتر الزامی است. مثال‌ها: "vanilla", "exec", "vt100", "vt102", "ansi", "xterm" usw. Wird kein Wert definiert, so wird "vanilla" verwendet.

The value "exec" executes the request via SSH command from the operating system. Therefore, more modern methods are used. However, this method is somewhat less efficient. The input ENV is set before the connection, so it may be ignored. The input SIZE is ignored with this method.

If additional SSH parameters need to be passed, they can be added in a new line after "exec". The parameters are case-sensitive and specified as follows. This example enables the RSA algorithm for older devices.

exec
HostKeyAlgorithms=+ssh-rsa
PubkeyAcceptedAlgorithms=+ssh-rsa

The following parameters are available:

SSH-Parameter für exec Beispielwert
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
ConnectTimeout 10
ServerAliveInterval 30
ServerAliveCountMax 3

Hinweis: Für weitere Details siehe die externe Dokumentation: https://linux.die.net/man/5/ssh_config (Englisch)

ورودی ENV

متغیرهای محیطی فعال را تعریف می‌کند. برای تعیین چندین متغیر، هر کدام در یک خط می‌توانند تعریف شوند. مثال:

LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8

ورودی SIZE

The size of the terminal is defined. By default, this is specified in characters but can also be defined in pixels. For example: "80x25" or "640x480px". If no value is defined, "80x25" is used.

ورودی RECV_PT

A timeout for receiving data per command in the format T# is defined. If no timeout is defined, T#150ms is used. If this value is not high enough, several commands will likely be executed during data output.

ورودی TIMEOUT

A timeout in the format T# is set for executing all commands. Once this is reached, the connection is terminated and the value is returned. ERROR is set to TRUE. The timeout is evaluated after the connection is established and authenticated. If the input PTY is set to "exec", the execution time is evaluated for the entire period. If no timeout is defined, T#300s is used.

خروجی DONE

The output returns a pulse upon success to perform the next operation. The pulse occurs when the process ends, even if an error has occurred.

خروجی RETURN

Upon successful execution, it returns the command's return value. The value is stored for later use.

Hinweis: Note that the console formats the output. Therefore, control characters or binary data may also be included.

خروجی RETERR

Upon faulty execution, it returns the command's return value. Also known as STDERR in SSH. The value is stored for later use.

Hinweis: Note that the console formats the output. Therefore, control characters or binary data may also be included.

خروجی ERROR

In case of an error, it returns a text with an error message. This is FALSE if no error has occurred. The state is stored for later use.

Possible causes:

  • The service of the storage medium was not started.
  • The memory was not initialized.
  • The login credentials are invalid.
  • The remote server could not be reached.
  • The storage medium does not exist.
  • The specified path is invalid.
  • Write access to the storage medium is denied.
  • No more storage space on the memory or the memory is write-protected.
  • The connection was unexpectedly terminated before all commands could be sent.
  • The defined timeout was reached.

همچنین ببینید