try to match with || again
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
		
					parent
					
						
							
								92cbfa951b
							
						
					
				
			
			
				commit
				
					
						2f96602bed
					
				
			
		
					 8 changed files with 27 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -5,6 +5,7 @@
 | 
			
		|||
# cd "${dir}" && git init
 | 
			
		||||
 | 
			
		||||
set -e
 | 
			
		||||
set -x
 | 
			
		||||
 | 
			
		||||
dir=/home/users/nico/ethz/ftp
 | 
			
		||||
site=ftp://ftp.ethz.ch/ETH
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,19 +1,20 @@
 | 
			
		|||
#!/bin/sh -e
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if [ -z "$USBHD" -o $# -ne 1 ]; then
 | 
			
		||||
   echo USBHD + interval
 | 
			
		||||
   exit 1
 | 
			
		||||
fi
 | 
			
		||||
#if [ -z "$USBHD" -o $# -ne 1 ]; then
 | 
			
		||||
#   echo USBHD + interval
 | 
			
		||||
#   exit 1
 | 
			
		||||
#fi
 | 
			
		||||
 | 
			
		||||
ccollect=/home/users/nico/lp/ccollect/ccollect/ccollect.sh
 | 
			
		||||
ccollect=/home/users/nico/oeffentlich/rechner/projekte/ccollect/ccollect/ccollect.sh
 | 
			
		||||
 | 
			
		||||
# in pre_exec
 | 
			
		||||
#cryptsetup luksOpen /dev/sdc usbhd
 | 
			
		||||
#mount /home/services/usbhd 
 | 
			
		||||
 | 
			
		||||
#cd /home/user/nico/p/ccollect/ccollect
 | 
			
		||||
CCOLLECT_CONF=/home/users/nico/ethz/ccollect $ccollect "$1" ikn
 | 
			
		||||
export CCOLLECT_CONF=/home/users/nico/ethz/ccollect
 | 
			
		||||
$ccollect $1 ikn$2
 | 
			
		||||
 | 
			
		||||
# in post_exec
 | 
			
		||||
#umount /home/services/usbhd 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -31,6 +31,6 @@ count="$1"; shift
 | 
			
		|||
for i in $(seq 1 16); do
 | 
			
		||||
   num=$(printf "%0.2d" $i) 
 | 
			
		||||
   echo Trying $cluster/${num}:
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}-ra${num} power off
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}-ra${num} power status
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}${num}-ra power off
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}${num}-ra power status
 | 
			
		||||
done
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -28,10 +28,11 @@ pass="$1"; shift
 | 
			
		|||
cluster="$1"; shift
 | 
			
		||||
count="$1"; shift
 | 
			
		||||
 | 
			
		||||
set -x
 | 
			
		||||
for i in $(seq 1 16); do
 | 
			
		||||
   num=$(printf "%0.2d" $i) 
 | 
			
		||||
   echo Trying $cluster/${num}:
 | 
			
		||||
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}-ra${num} power on
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}-ra${num} power status
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}${num}-ra power on &
 | 
			
		||||
   ipmitool -U "$user" -P "$pass" -I lanplus -H ${cluster}${num}-ra power status &
 | 
			
		||||
done
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,11 +23,14 @@ export day="$(date +%d)"
 | 
			
		|||
# 
 | 
			
		||||
# for all other reservations: delete
 | 
			
		||||
# 
 | 
			
		||||
   #sed 's/||/|/g'    | \
 | 
			
		||||
   #sed 's/|/||/g'
 | 
			
		||||
 | 
			
		||||
curl --silent --netrc ${site} | \
 | 
			
		||||
   sed 's/||/|/g'    | \
 | 
			
		||||
   awk -F'|' \
 | 
			
		||||
      '$4 !~ /(permanent|time-frame|^ *$)/ { 
 | 
			
		||||
   awk 'BEGIN { FS="||" } 
 | 
			
		||||
      { print "- " $1 "--" }
 | 
			
		||||
 | 
			
		||||
      $4 !~ /(permanent|time-frame|^ *$)/ { 
 | 
			
		||||
 | 
			
		||||
      orig = $0
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -53,6 +56,5 @@ curl --silent --netrc ${site} | \
 | 
			
		|||
   }
 | 
			
		||||
      # print unchangable lines
 | 
			
		||||
      $4 ~ /(permanent|time-frame|^ *$)/ { print $0 }
 | 
			
		||||
   ' | \
 | 
			
		||||
   sed 's/|/||/g'
 | 
			
		||||
   '
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,13 +15,13 @@
 | 
			
		|||
set -x
 | 
			
		||||
 | 
			
		||||
ip l s eth0 down
 | 
			
		||||
( wpa_cli terminate; exit 0 )
 | 
			
		||||
( wpa_cli terminate || exit 0 )
 | 
			
		||||
 | 
			
		||||
( rmmod iwlagn; modprobe iwlagn; sleep 2 )
 | 
			
		||||
# ( rmmod iwlagn; modprobe iwlagn; sleep 2 )
 | 
			
		||||
 | 
			
		||||
wpa_supplicant -B -Dwext -iwlan0 -c ~nico/ethz/wlan/wpa_supplicant.conf
 | 
			
		||||
sleep 5
 | 
			
		||||
udhcpc -nqfi wlan0
 | 
			
		||||
( udhcpc -nqfi wlan0 || dhcpcd wlan0 )
 | 
			
		||||
vpnc ~nico/ethz/vpn/sg.conf
 | 
			
		||||
 | 
			
		||||
#vpnc ~nico/firmen/ethz/vpn/vpnc.conf
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -6,8 +6,6 @@ BDIR=~/b/ikiwiki
 | 
			
		|||
 | 
			
		||||
START="$(date)"
 | 
			
		||||
PERL5LIB=${BDIR}  ${BDIR}/ikiwiki.in \
 | 
			
		||||
	--libdir ${BDIR} \
 | 
			
		||||
	--templatedir ${BDIR}/templates \
 | 
			
		||||
	--setup ikiwiki.setup \
 | 
			
		||||
   "$@"
 | 
			
		||||
ret=$?
 | 
			
		||||
| 
						 | 
				
			
			@ -16,3 +14,5 @@ echo ${START} - ${END}: ikiwiki result: $?
 | 
			
		|||
 | 
			
		||||
#	-set underlaydir=${BDIR}/underlays/basewiki \
 | 
			
		||||
#	-set underlaydirbase=${BDIR}/underlays \
 | 
			
		||||
#	--libdir ${BDIR} \
 | 
			
		||||
#	--templatedir ${BDIR}/templates \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,5 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
 | 
			
		||||
[ -x /usr/bin/urxvtcd ] && exec /usr/bin/urxvtcd 
 | 
			
		||||
 | 
			
		||||
exec urxvtc
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue