*New 11.4 series Release:
2020-07-03: XigmaNAS 11.4.0.4.7633 - released!

*New 12.1 series Release:
2020-04-17: XigmaNAS 12.1.0.4.7542 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Need help installing "expect" on 9.1

XigmaNAS Scripts and shell tips
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
myriad
NewUser
NewUser
Posts: 4
Joined: 17 Dec 2012 13:33
Status: Offline

Need help installing "expect" on 9.1

#1

Post by myriad »

I am trying to run a script to automatically log me in to my openVPN connection at bootup. the script is roughly:

Code: Select all

#!/usr/bin/expect -f
set force_conservative 0
if {$force_conservative} {
set send_slow {1 .1}
proc send {ignore arg} {
sleep .1
exp_send -s -- $arg
}
}

set timeout -1
spawn openvpn remote.ovpn
match_max 100000
expect -exact "Enter Auth Username:"
send -- "username\r"
expect -exact "Enter Auth Password:"
send -- "password\r"
expect eof
The only problem is that spawn & expect wont work because they are not compiled with the nas4free kernal. However, when I try to get expect I get an error due to the fact that FreeBSD repository has NO 9.1 ports at all. How do I install the dependencies so I can get this script to the next level?

User avatar
raulfg3
Site Admin
Site Admin
Posts: 5116
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Need help installing "expect" on 9.1

#2

Post by raulfg3 »

until BSD 9.1 where in RC status, you need to use:

Code: Select all

setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/
prior to try to install anything.

once BSD is 9.1 Release and packages are compiled and ready to dowload, is not more needed.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

HP T510

myriad
NewUser
NewUser
Posts: 4
Joined: 17 Dec 2012 13:33
Status: Offline

Re: Need help installing "expect" on 9.1

#3

Post by myriad »

That's for 64bit. i386 for 32?

User avatar
raulfg3
Site Admin
Site Admin
Posts: 5116
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Need help installing "expect" on 9.1

#4

Post by raulfg3 »

for 64 bit ( X64).

for i386 you need.

Code: Select all

ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-current/Latest/
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

HP T510

myriad
NewUser
NewUser
Posts: 4
Joined: 17 Dec 2012 13:33
Status: Offline

Re: Need help installing "expect" on 9.1

#5

Post by myriad »

Thanks for the info. know this is a bit off topic, but if I want to reinstall the 64bit version of N4F can I re-import my saved config and just continue on??

fsbruva
Advanced User
Advanced User
Posts: 378
Joined: 21 Sep 2012 14:50
Status: Offline

Re: Need help installing "expect" on 9.1

#6

Post by fsbruva »

Of course! Upon re-install, however, your network settings might not be quite right, so accessing the GUI might be a little difficult.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 5116
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Need help installing "expect" on 9.1

#7

Post by raulfg3 »

myriad wrote:Thanks for the info. know this is a bit off topic, but if I want to reinstall the 64bit version of N4F can I re-import my saved config and just continue on??
latest 9.1.0.1.573 is BSD9.1 release. if you upgrade Nas4Free , no need to use setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports ... nt/Latest/
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

HP T510

Post Reply

Return to “Scripts and shell tips”