From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <46C57871.7000007@stc.donpac.ru> Date: Fri, 17 Aug 2007 14:29:05 +0400 From: Eugene Prokopiev User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.8.1.4) Gecko/20070531 SeaMonkey/1.1.2 MIME-Version: 1.0 To: Community@lists.altlinux.org Content-Type: text/plain; charset=UTF-8; format=flowed X-DSPAM-Result: Innocent X-DSPAM-Processed: Fri Aug 17 14:35:50 2007 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 77,46c57a06263269806888083 X-DSPAM-Factors: 27, proc+drbd, 0.40000, не+оÑÑавлÑеÑ, 0.40000, вÑÑÑгаÑÑÑÑ, 0.40000, Received*Postfix+with, 0.40000, drbd0+proc, 0.40000, drbd0+proc, 0.40000, Content-Type*charset+UTF-8, 0.40000, Received*for+Community, 0.40000, User-Agent*20070531+SeaMonkey, 0.40000, awk+F', 0.40000, Content-Type*text+plain, 0.40000, $filesystem+!, 0.40000, state+cat, 0.40000, 0+fi, 0.40000, User-Agent*ru-RU+rv, 0.40000, Received*ESMTP, 0.40000, одна+веÑнÑла, 0.40000, Received*2007+14, 0.40000, Content-Transfer-Encoding*8bit, 0.40000, и, 0.40000, bin+sh, 0.40000, Subject*shell+logical, 0.40000, HAD+Monitor, 0.40000, User-Agent*X11+U, 0.40000, Date*Fri, 0.40000, Received*17+Aug, 0.40000, Received*enp-mobile.ats-network.stc.donpac.ru+unknown, 0.40000 Content-Transfer-Encoding: quoted-printable Subject: [Comm] shell logical expressions X-BeenThere: community@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: ALT Linux Community List-Id: ALT Linux Community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Aug 2007 10:35:54 -0000 Archived-At: List-Archive: List-Post: =D0=97=D0=B4=D1=80=D0=B0=D0=B2=D1=81=D1=82=D0=B2=D1=83=D0=B9=D1=82=D0=B5! =D0=9D=D1=83=D0=B6=D0=BD=D0=BE =D0=B2=D1=8B=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8= =D1=82=D1=8C =D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE =D0=BA= =D0=BE=D0=BC=D0=B0=D0=BD=D0=B4, =D0=B5=D1=81=D0=BB=D0=B8 =D1=85=D0=BE=D1=82= =D1=8F =D0=B1=D1=8B =D0=BE=D0=B4=D0=BD=D0=B0 =D0=B2=D0=B5=D1=80=D0=BD=D1=83= =D0=BB=D0=B0 =D0=BD=D0=B5 0, =D1=82=D0=BE=D0=B6=D0=B5=20 =D0=B2=D0=B5=D1=80=D0=BD=D1=83=D1=82=D1=8C =D0=BD=D0=B5 0 =D0=B8 =D0=B2=D1= =8B=D1=80=D1=83=D0=B3=D0=B0=D1=82=D1=8C=D1=81=D1=8F. =D0=94=D0=B5=D0=BB=D0= =B0=D1=8E =D0=BF=D1=80=D0=B8=D0=BC=D0=B5=D1=80=D0=BD=D0=BE =D1=82=D0=B0=D0= =BA: #!/bin/sh [ `drbdadm state all | awk -F'/' '{print $1}'` =3D=3D "Primary" ] partition=3D$? grep drbd0 /proc/mounts > /dev/null filesystem=3D$? if [ $partition !=3D '0' ] || [ $filesystem !=3D '0' ] ; then mail -s "HAD Monitor fail" root << EOF drbd state: `cat /proc/drbd` mount state: `grep drbd0 /proc/mounts` EOF exit 1 else exit 0 fi =D0=9D=D0=BE =D0=BD=D0=B5 =D0=BE=D1=81=D1=82=D0=B0=D0=B2=D0=BB=D1=8F=D0=B5= =D1=82 =D0=BE=D1=89=D1=83=D1=89=D0=B5=D0=BD=D0=B8=D0=B5 =D0=BA=D1=80=D0=B8= =D0=B2=D0=B8=D0=B7=D0=BD=D1=8B =D0=BA=D1=83=D1=81=D0=BA=D0=B0 =D0=BA=D0=BE= =D0=B4=D0=B0 =D1=81 if. =D0=9C=D0=BE=D0=B6=D0=BD=D0=BE =D0=BF=D1=80=D0=B0= =D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D0=B5=D0=B5/=D0=BF=D1=80=D0=BE=D1=89=D0=B5= ? --=20 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=9F=D1=80=D0=BE=D0=BA=D0=BE=D0=BF=D1=8C=D0=B5=D0=B2 =D0=95=D0=B2=D0=B3= =D0=B5=D0=BD=D0=B8=D0=B9