Comments (7)
I am thrilled!
It works after changing from "#!/bin/bash" to "#!/bin/sh" in the script.
THANKS
from spksrc.
@digi74 what do you need expect
for?
AFAICS expect requires tcl and is hard to cross compile.
from spksrc.
Thanks for asking!
A backup script that connects to switches via telnet and pulls a configuration backup. Unfortunately these devices do not support ssh.
I thought it might be easy, not in this case, no problem
:)
from spksrc.
Thanks for asking! A backup script that connects to switches via telnet and pulls a configuration backup. Unfortunately these devices do not support ssh. I thought it might be easy, not in this case, no problem :)
Don't give up so fast, I have done some progress, I tend to include expect
in the synocli-misc package.
EDIT:
Everything builds successfully, except the sample scripts (those fail to create since the cross compiled tclsh is not executable).
But I think we do not need those scripts in the package (those are: timed-run timed-read ftp-rfc autopasswd lpunlock weather passmass rftp kibitz rlogin-cwd xpstat tkpasswd dislocate xkibitz tknewsbiff unbuffer mkpasswd cryptdir decryptdir autoexpect multixterm
)
from spksrc.
I think you really don't need the examples.
an example of my telnet part of the script:
`
expect - <<EOF
set timeout 10
spawn ssh -l$username "$hostname"
expect "password"
send $password
send "\r"
expect "continue"
send "\r"
expect "#"
send "copy startup-config tftp fs1 $tftpfolder/$filename pc\r"
sleep 3
send "exit\r"
expect "#"
send "exit\r"
expect ">"
send "quit\r"
expect "log out"
send "y"
EOF
`
regards us gsiberg
from spksrc.
@digi74 you can download the synocli-misc package created by github build action
https://github.com/SynoCommunity/spksrc/actions/runs/9847463175
you need to extract the spk file from the artifacts-zip-file for the arch of you model, then you can manually install the spk File in the DSM package center.
from spksrc.
@digi74 thanks for the feedback.
Indeed, the example scripts use /bin/sh
too
#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh "$0" ${1+"$@"}
package require Expect
...
from spksrc.
Related Issues (20)
- [Package Request] Audiobookshelf
- ffmpeg6 segmentation fault on Marvell PJ4Bv7 Processor rev 1 (v7l) for h264 (libx264) HOT 11
- [Package Update Request] Kavita v0.8.2
- [Package Request] Komga HOT 1
- jellyfin_armv7-7.0_10.7.0-1 crashing on start in synology ds218j HOT 1
- [Package Feature Request] Cloudflare Tunnel option HOT 6
- [Package Request] gdb HOT 2
- Building usbip HOT 1
- Domoticz on SRM HOT 2
- JellyFin media paths (no longer?) match. HOT 3
- [Package Update] borg to v1.4 and borgmatic to v1.8.13
- DSM 7.x x86_64 packages? HOT 3
- [Package Request] moreutils ts HOT 2
- [Package Request] Auditd
- [Package Request] Jellyfin for armada38xx HOT 3
- Update DSM 7.2.2 toolchains - 7.2-72746
- [Documentation Suggestion] For a beginner, it's non-trivial to figure out how mosh works. Here are some suggestions. (not a bug) HOT 1
- [Package Request] Update SABnzbd 4.3.3
- how to get log output during development of wizard pages? HOT 9
- [Package Request] scrutiny HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spksrc.