diff options
author | Kévin Raymond <kraymond@avencall.com> | 2012-07-04 13:21:28 +0200 |
---|---|---|
committer | Kévin Raymond <kraymond@avencall.com> | 2012-07-04 13:21:28 +0200 |
commit | ac93d943e916ec5d589a1f6cd9c15840dd9ca94b (patch) | |
tree | 9df8d39301344742c0cabfb14d4a1ae07a5b4148 | |
parent | e7369eb7683eaa88f711fbc93bfcfa17503e551f (diff) |
full_IO arg issues
-rwxr-xr-x | full_IO/full_IO.sh | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/full_IO/full_IO.sh b/full_IO/full_IO.sh index 8146faa..f935e82 100755 --- a/full_IO/full_IO.sh +++ b/full_IO/full_IO.sh @@ -34,6 +34,29 @@ EXAMPLE: EOF } + +# +# Configure PCB and XHD +# +update() +{ + PCB="$PCB$BYTE" + scp pcb/system.conf $PCB:$DAHDI_PATH + scp pcb/extensions.conf $PCB:$ASTERISK_PATH + scp pcb/chan_dahdi.conf $PCB:$ASTERISK_PATH + ssh -T $PCB <<\EOI + dahdi_cfg + /etc/init.d/asterisk restart + exit +EOI + + sudo cp xhd/system.conf $DAHDI_PATH + sudo cp xhd/extensions.conf $ASTERISK_PATH + sudo cp xhd/chan_dahdi.conf $ASTERISK_PATH + sudo dahdi_cfg + sudo /etc/init.d/asterisk restart +} + while getopts ":hun:" OPTION do case $OPTION in @@ -45,7 +68,7 @@ do NUMBER=$OPTARG ;; u) - update + INIT=1 ;; ?) usage @@ -64,29 +87,6 @@ fi BYTE=$* # -# Configure PCB and XHD -# -update() -{ - PCB="$PCB$BYTE" - scp pcb/system.conf $PCB:$DAHDI_PATH - scp pcb/extensions.conf $PCB:$ASTERISK_PATH - scp pcb/chan_dahdi.conf $PCB:$ASTERISK_PATH - ssh -T $PCB <<\EOI - dahdi_cfg - /etc/init.d/asterisk restart - exit -EOI - - sudo cp xhd/system.conf $DAHDI_PATH - sudo cp xhd/extensions.conf $ASTERISK_PATH - sudo cp xhd/chan_dahdi.conf $ASTERISK_PATH - sudo dahdi_cfg - sudo /etc/init.d/asterisk restart -} - - -# # Several checks # hstname=`hostname` @@ -108,7 +108,8 @@ then exit 1 fi -[ "@$NUMBER" = "@" ] && NUMBER=$FULL_TEST +[ -z $INIT ] && update +[ -z $NUMBER ] || NUMBER=$FULL_TEST # # Running the test |