Displaying 15 results from an estimated 15 matches for "bash_rematch".
2012 Sep 13
0
[RFC] openvswitch support script
...;$mac"
}
add_to_openvswitch () {
local dev=$1
local bridge="$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")"
local tag trunk
if [[ $bridge =~ ^([^.:]+)(\.([[:digit:]]+))?(:([[:digit:]]+(:[[:digit:]]+)*))?$ ]]; then
bridge="${BASH_REMATCH[1]}"
tag="${BASH_REMATCH[3]}"
trunk="${BASH_REMATCH[5]//:/,}"
else
fatal "No valid brdige was specified"
fi
if [ $trunk ]; then
local trunk_arg="trunk=$trunk"
fi
if [ $tag ]; then
local tag_ar...
2013 Apr 18
10
[PATCH] hotplug: add openvswitch script
...t;
+}
+
+add_to_openvswitch () {
+ local dev=$1
+ local bridge="$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")"
+ local tag trunk
+
+ if [[ $bridge =~ ^([^.:]+)(\.([[:digit:]]+))?(:([[:digit:]]+(:[[:digit:]]+)*))?$ ]]; then
+ bridge="${BASH_REMATCH[1]}"
+ tag="${BASH_REMATCH[3]}"
+ trunk="${BASH_REMATCH[5]//:/,}"
+ else
+ fatal "No valid bridge was specified"
+ fi
+
+ if [ $trunk ]; then
+ local trunk_arg="trunk=$trunk"
+ fi
+
+ if [ $tag ]; then
+...
2024 Mar 19
2
Bug#1067151: xen-utils-common: vif-openvswitch ignores MTU
...;$mac"
}
add_to_openvswitch () {
local dev=$1
local bridge="$(xenstore_read_default "$XENBUS_PATH/bridge" "$bridge")"
local tag trunk
if [[ $bridge =~ ^([^.:]+)(\.([[:digit:]]+))?(:([[:digit:]]+(:[[:digit:]]+)*))?$ ]]; then
bridge="${BASH_REMATCH[1]}"
tag="${BASH_REMATCH[3]}"
trunk="${BASH_REMATCH[5]//:/,}"
else
fatal "No valid bridge was specified"
fi
if [ $trunk ]; then
local trunk_arg="trunk=$trunk"
fi
if [ $tag ]; then
local tag_ar...
2016 Jul 14
2
Best practice to shutdown hosts which has not NUT via upssched
Thank you for answer Stuart
>?????, 13 ???? 2016, 17:54 +03:00 ?? Stuart Gathman <stuart at gathman.org>:
>
>On 07/13/2016 10:02 AM, Stuart Gathman wrote:
>> On 07/13/2016 04:17 AM, Dmitri Stepanov wrote:
>>> I need to shutdown a number of hosts which has not NUT from one which has it.
>> Let's make sure you are not missing an obvious point. By
2013 Dec 13
17
[Bug 10322] New: Slow Performance over Network rsync
https://bugzilla.samba.org/show_bug.cgi?id=10322
Summary: Slow Performance over Network rsync
Product: rsync
Version: 3.1.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P5
Component: core
AssignedTo: wayned at samba.org
ReportedBy: Joerg.Grube at Gmx.De
2016 Jul 14
0
Best practice to shutdown hosts which has not NUT via upssched
...to have a micro upsmon in the form of a cron job in
every slave which, every minute, runs something like
rprice at maria:~> X=$( echo "GET VAR my-ups battery.charge" | netcat -w1 upsd-server 3493 )
rprice at maria:~> if [[ "$X" =~ \"([0-9]*)\" ]] ; then Y=${BASH_REMATCH[1]}; else Y=999 ; fi
rprice at maria:~> if [[ "$Y" -gt 35 ]] ; then echo "Carry on $Y" ; else echo "Shutdown $Y" ; fi
Carry on 100
Different slaves could have different low battery values. I'm sure that a
netcat expert would be able to find a way of execut...
2016 May 09
0
cyberpower ups need to manully turn on the switch
...##### Ownership and permissions ###########" >> $T
ls -alF /usr/sbin/ups* >> $T
ls -alF /etc/ups/* | grep -v -E "~|stats|set" >> $T
# Remove password from report
L=`grep password $T | tr -d " \t\n\r"`
if [[ "$L" =~ ^.*=(.+)$ ]]
then PASS="${BASH_REMATCH[1]}"
sed "s/$PASS/*********/" < $T > $R
else # Could not find a password
cat $T > $R
fi
echo "I have created file \"$R\" with a summary of your NUT configuration."
echo "Passwords have been removed."
rm $T;
exit
2016 May 09
2
cyberpower ups need to manully turn on the switch
Hi
centos 6.3 uses traditional SysV script ( not systemctl)
here is the /etc/init.d/ups ( script) assuming it similar to nutshutdown
# more /etc/init.d/ups
#! /bin/bash
#
# ups: Starts the Network UPS Tools
#
# chkconfig: - 26 74
# description: Network UPS Tools is a collection of programs which provide
a common \
# interface for monitoring and administering UPS hardware.
# processname: upsd
#
2017 Feb 04
0
[PATCH v8 4/4] v2v: ova: don't extract files from OVA if it's not needed
...e arguments
+qemu_is_version() {
+ if [ $# -ne 2 ] ; then
+ echo "Usage: $0 <major_version> <minor_version>" >&2
+ return 3
+ fi
+
+
+ [[ "$(qemu-img --version)" =~ 'qemu-img version '([0-9]+)\.([0-9]+) ]] || return 2
+ QMAJ=${BASH_REMATCH[1]}
+ QMIN=${BASH_REMATCH[2]}
+
+ if [ \( $QMAJ -gt $1 \) -o \( $QMAJ -eq $1 -a $QMIN -ge $2 \) ] ; then
+ return 0
+ fi
+
+ return 1
+}
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 9189aaf12..d62ac477e 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -260,6 +260,7 @...
2016 May 09
2
cyberpower ups need to manully turn on the switch
...#########" >> $T
> ls -alF /usr/sbin/ups* >> $T
> ls -alF /etc/ups/* | grep -v -E "~|stats|set" >> $T
>
> # Remove password from report
> L=`grep password $T | tr -d " \t\n\r"`
> if [[ "$L" =~ ^.*=(.+)$ ]]
> then PASS="${BASH_REMATCH[1]}"
> sed "s/$PASS/*********/" < $T > $R
> else # Could not find a password
> cat $T > $R
> fi
>
> echo "I have created file \"$R\" with a summary of your NUT configuration."
> echo "Passwords have been removed."...
2017 Feb 03
3
[PATCH v7 0/1] Import directly from OVA tar archive if possible
v7:
- rebased because patch 1/3 has been pushed
- changes to nsplit have been dropped (2/3)
- addressed Richard's comments, notably the subfolder function was moved to
mllib and renamed to subdirectory
v6:
- just rebase
v5:
- rebase, patches 1,3,5 were merged
- 1/3: we still need to discuss whether to detect compressed discs
- 2/3:
- renamed argument noempty to keep_empty
- tests were
2017 Feb 03
0
[PATCH v7 1/1] v2v: ova: don't extract files from OVA if it's not needed
...e arguments
+qemu_is_version() {
+ if [ $# -ne 2 ] ; then
+ echo "Usage: $0 <major_version> <minor_version>" >&2
+ return 3
+ fi
+
+
+ [[ "$(qemu-img --version)" =~ 'qemu-img version '([0-9]+)\.([0-9]+) ]] || return 2
+ QMAJ=${BASH_REMATCH[1]}
+ QMIN=${BASH_REMATCH[2]}
+
+ if [ \( $QMAJ -gt $1 \) -o \( $QMAJ -eq $1 -a $QMIN -ge $2 \) ] ; then
+ return 0
+ fi
+
+ return 1
+}
diff --git a/v2v/Makefile.am b/v2v/Makefile.am
index 9189aaf12..d62ac477e 100644
--- a/v2v/Makefile.am
+++ b/v2v/Makefile.am
@@ -260,6 +260,7 @...
2007 Sep 03
3
Classes do not receive any traffic ?
...rts
27000:27030,27901,27960,28960,28960,28960,14567,16567 -j ${dev[2]}_CON_GRY
iptables -t mangle -A ${dev[2]}_CHECK -j ${dev[2]}_IMQ
iptables -t mangle -N ${dev[2]}_KONIEC
iptables -t mangle -A ${dev[2]}_KONIEC -j RETURN
if [[ ${dev[0]} =~ ''imq(.*)'' ]] ; then
export numdev=${BASH_REMATCH[1]}
iptables -t mangle -A ${dev[2]}_IMQ -j IMQ --todev ${numdev}
fi
iptables -t mangle -A ${dev[2]}_IMQ -j ${dev[2]}_KONIEC
if [[ ${dev[2]} =~ ''DL'' ]] ; then
iptables -t mangle -I ${dev[7]} -i ${dev[1]} -j ${dev[2]}_CHECK
elif [[ ${dev[2]} =~ ''UL'' ]] ; then
iptab...
2017 Feb 04
8
[PATCH v8 0/4] Import directly from OVA tar archive if possible
v8:
- split the big patch into several commits
v7:
- rebased because patch 1/3 has been pushed
- changes to nsplit have been dropped (2/3)
- addressed Richard's comments, notably the subfolder function was moved to
mllib and renamed to subdirectory
v6:
- just rebase
v5:
- rebase, patches 1,3,5 were merged
- 1/3: we still need to discuss whether to detect compressed discs
- 2/3:
-
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...y wildcards.
elif [[ "$file" =~ '^ld-[.0-9]+\.so$' ]]; then
- echo "$dir/ld-*.so" >&6
+ echo "$dir/ld-*.so" >&6
# libfoo-1.2.3.so
elif [[ "$file" =~ '^lib(.*)-[-.0-9]+\.so$' ]]; then
- echo "$dir/lib${BASH_REMATCH[1]}-*.so" >&6
+ echo "$dir/lib${BASH_REMATCH[1]}-*.so" >&6
# libfoo-1.2.3.so.1.2.3 (but NOT '*.so.N')
elif [[ "$file" =~ '^lib(.*)-[-.0-9]+\.so\.([0-9]+)\.' ]]; then
- echo "$dir/lib${BASH_REMATCH[1]}-*.so.${BASH_REMATCH[...