
Sometimes I get really frustrated when the diffs between Linux and MS catch me out
I'm trying to automate my eeePC deployment by creating a superscript to run all the things I've put on the wiki
Auto Connect but I'm bombing out straight away.
Should this script work
I try running it usingCode:#!/bin/bash sudo mkdir /mnt/sharename sudo chmod 777 /mnt/sharename sudo cp ./etc/network/if-up.d/nynetstart /etc/network/if-up.d/mynetstart sudo chmod 777 /etc/network/if-up.d/mynetstart sudo cp ./home/user/.network-autostart /home/user/.network-autostart sudo chmod 777 /home/user/.network-autostart sudo ln -s /mnt/sharename sharename
sh ./installnet.sh (which is what is called) (its in /home/user)
I'm just getting garbage error msgs saying things like ":command not foundne 2:" and then finding there is a folder called sharename? being created in /mnt
I know I'm missing something fundemental but I can't work out what
help
regards
Simon
add this as the second line of your script:
Read through the output carefully.Code:set -x
More info on the 'set' command can be found by typing 'help set' at your nearest console window.

@geoff
As usual - your comments are of no practical use but I'm sure with another 4 hours of work I could get there
(I just get
:invalid option line 2: set: -
Could you not just say in english what I need to do?
@Gerry - ta for info - it'll come in handy when I get the 1st line working
regards
Simon
Try running the script like this:
I typed in "help sh" and gotCode:sudo ./installnet.sh
Code:shift: shift [n] The positional parameters from $N+1 ... are renamed to $1 ... If N is not given, it is assumed to be 1. shopt: shopt [-pqsu] [-o long-option] optname [optname...] Toggle the values of variables controlling optional behavior. The -s flag means to enable (set) each OPTNAME; the -u flag unsets each OPTNAME. The -q flag suppresses output; the exit status indicates whether each OPTNAME is set or unset. The -o option restricts the OPTNAMEs to those defined for use with `set -o'. With no options, or with the -p option, a list of all settable options is displayed, with an indication of whether or not each is set.

@gerry
Haven't got access to a machine until tonight but I'm sure I tried sudo ing and got a different error msgbut I'll try again
)
I typed in "help sh" and got![]()
![]()
Don't know what you are trying to tell me!
regards
Simon
Ooops! Quite right, doesn't make much sense out-of-context! And it's actually wrong - my initial thought after running "help sh" in a terminal was that it was not Bash but something else. I should have used "man sh" - more descriptive.I'm not a Linux guru, but I have been using Ubuntu now for a few months.
You don't need to use "sh ./installnet.sh" if you make the script executable. In a terminal type:
then you can remove the "sh".Code:sudo chmod +x installnet.sh
If your script still won't work, paste the full output from the terminal here for us to examine.

@geoff - I'm very very sorry
I just thought that it would be something simple that someone could easily point out (like need to run as root or something like that)
And I was tearing my hair out cause I knew it was something simple
It was.
I'll make a new post so other pretend @nix geeks son't get caught out like me
Sorry again
regards
Simon
There are currently 1 users browsing this thread. (0 members and 1 guests)