Sponsored Content
Top Forums UNIX for Dummies Questions & Answers a problem with write a script in Linux version 2.4.27-ubnt0 Post 302471639 by cygol on Sunday 14th of November 2010 12:05:53 PM
Old 11-14-2010
a problem with write a script in Linux version 2.4.27-ubnt0

Hello everyone,
I have a radio wireless called UBNT Nanostation5
It has this linux OS:Linux version 2.4.27-ubnt0

When i want to write a script in ssh, i get some errors
The script is:

Code:
ifconfig eth0 down

ifconfig eth0 hw ether 00:15:6D:**:**:**

ifconfig eth0 up

cfg -x

echo "ifconfig br0 down; ifconfig wifi0 down; ifconfig wifi0 hw ether 00:15:6D:**:**:**; ifconfig wifi0 up; ifconfig br0 up" > /etc/persistent/rc.prestart

cfgmtd -w -p /etc/

reboot

And errors that i get are:

Code:
# ifconfig eth0 down

ifconfig eth0 hw ether 00:15:6D:**:**:**

ifconfig eth0 up

cfg -x

echo "ifconfig br0 down; ifconfig wifi0 down; ifconfig wifi0 hw ether 00:15:6D:**:**:**; ifconfig wifi0 up; ifconfig br0 up" > /etc/persistent/rc.prestart

cfgmtd -w -p /etc/
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939# ifconfig eth0 hw ether 00:15:6D:1A:74:1D
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939# ifconfig eth0 up
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939# cfg -x
-sh: cfg: not found
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939# echo "ifconfig br0 down; ifconfig wifi0 down                           ; ifconfig wifi0 hw ether 00:15:6D:**:**:**; ifconfig wifi0 up; ifconfig br0 up"                            > /etc/persistent/rc.prestart
-sh: gt: not found
-sh: /etc/persistent/rc.prestart: not found
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939#
XS5.ar2313.v3.5.1.4631.300610.1939# cfgmtd -w -p /etc/
ifconfig br0 down; ifconfig wifi0 down; ifconfig wifi0 hw ether 00:15:6D:**:**:**; ifconfig wifi0 up; ifconfig br0 up
Found Backup1 on[1] ...
Found  Active on[2] ...
Storing Active[1] ... [%100]
Active->Backup[2] ... [%100]
[1] + Done                       echo "ifconfig br0 down; ifconfig wifi0 down; i                           fconfig wifi0 hw ether 00:15:6D:**:**:**; ifconfig wifi0 up; ifconfig br0 up"
XS5.ar2313.v3.5.1.4631.300610.1939#

why do i receive these "not found" errors?

thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need to write a home-grown backup script for Linux

I am researching ways in which to backup files or whole file systems for backup to another system. We are using Suse Linux 7.0 with no tape backup devices or secondary disks. What utilities would be the best to use for a simple yet flexible script for backup purposes? tar, cpio, compress. (3 Replies)
Discussion started by: darthur
3 Replies

2. UNIX for Dummies Questions & Answers

How to write my own version of pthread_join()

I would like to write my own version of pthread_join and some of the other pthread function. Does some know any pages that have som examples of doing this?? (1 Reply)
Discussion started by: bigblop
1 Replies

3. UNIX for Dummies Questions & Answers

How do I see which version of Linux I am using ?

I want to know the distribution and version of linux that I am running: uname -r gives me: 2.4.20-8bldsmp uname -v gives me: #1 SMP Wed Sep 20 19:32:24 PDT 2006 Whats the distribution ? and whats the version ? thanks !!! (1 Reply)
Discussion started by: the_learner
1 Replies

4. Linux

Why is there so many linux version?

Hi, Why is there many different Linux names and SO instead to be only one? What are the differences? Paul Weinstock (3 Replies)
Discussion started by: Paul Weinstock
3 Replies

5. Linux

How to know the Linux version?

Hi, How to know the Linux version in the box in which linux is installed ? Cheers K Md Shakeel (3 Replies)
Discussion started by: krackjack
3 Replies

6. Shell Programming and Scripting

Write a shell script security policy settings for linux

The pro help! Write a shell script setup for linux security policies include: 1. login (username and password login). 2. add, delete your username and password. 3. firewall. Note: Write a shell script file as follows: If login successful then Step 2. If step 2 succeeds (ie add,... (1 Reply)
Discussion started by: ngovuongbinhtay
1 Replies

7. Linux

Linux Version of IE?

Is there a linux version of IE? (5 Replies)
Discussion started by: billcrosby
5 Replies

8. Shell Programming and Scripting

How to write bash script for creating user on multiple Linux hosts?

I wonder whether someone can help me with what I'm trying to achieve Basically, the objective is one script to create new user on more than 70 linux hosts if required. Everything works apart from the highlighted part. It gave me an output passwd: Unknown user name ''. when try to set... (35 Replies)
Discussion started by: fugeulu
35 Replies

9. Shell Programming and Scripting

Setuid not working in Linux as script fails to write to file.

Hi, I have the following 3 test files to test setuid bit which if it works I would like to implement in our application. However setuid doesnot seem to be having any impact on my test below.Following are the 3 files of interest in /tmp/ folder. $ ls -ltr *env* -rw------- 1 g332008 users 6... (23 Replies)
Discussion started by: waavman
23 Replies

10. Shell Programming and Scripting

Write Linux script to convert timestamps older than 1.1.1970 to 1.1.1980

I am having problems because some of my files have timestamps that are earlier that 1.1.1970, the Unix start of time convention. So I would like to write a script that finds all files in home folder and subfolders with timestamps earlier than 1.1.1970 and converts them to 1.1.1980. I... (3 Replies)
Discussion started by: francus
3 Replies
inet_type(4)                                                       File Formats                                                       inet_type(4)

NAME
inet_type - default Internet protocol type SYNOPSIS
/etc/default/inet_type DESCRIPTION
The inet_type file defines the default IP protocol to use. Currently this file is only used by the ifconfig(1M) and netstat(1M) commands. The inet_type file can contain a number of <variable>=<value> lines. Currently, the only variable defined is DEFAULT_IP, which can be assigned a value of IP_VERSION4, IP_VERSION6, or BOTH. The output displayed by the ifconfig and netstat commands can be controlled by the value of DEFAULT_IP set in inet_type file. By default, both commands display the IPv4 and IPv6 information available on the system. The user can choose to suppress display of IPv6 information by setting the value of DEFAULT_IP. The following shows the possible values for DEFAULT_IP and the resulting ifconfig and netstat output that will be displayed: IP_VERSION4 Displays only IPv4 related information. The output displayed is backward compatible with older versions of the ifconfig(1M) and netstat(1M) commands. IP_VERSION6 Displays both IPv4 and IPv6 related information for ifconfig and netstat. BOTH Displays both IPv4 and IPv6 related information for ifconfig and netstat. The command-line options to the ifconfig and netstat commands override the effect of DEFAULT_IP as set in the inet_type file. For example, even if the value of DEFAULT_IP is IP_VERSION4, the command example% ifconfig -a6 will display all IPv6 interfaces. EXAMPLES
Example 1: Suppressing IPv6 Related Output This is what the inet_type file must contain if you want to suppress IPv6 related output: DEFAULT_IP=IP_VERSION4 SEE ALSO
ifconfig(1M), netstat(1M) SunOS 5.10 16 Jun 1999 inet_type(4)
All times are GMT -4. The time now is 05:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy