1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-18 10:04:20 +03:00

And more fixes for cmirror build.

This commit is contained in:
Alasdair Kergon 2010-01-19 02:04:33 +00:00
parent f7729ec651
commit 81410c8f09
6 changed files with 65 additions and 44 deletions

3
configure vendored
View File

@ -15531,7 +15531,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
################################################################################ ################################################################################
ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile doc/Makefile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/Makefile test/Makefile test/api/Makefile tools/Makefile udev/Makefile" ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile doc/Makefile include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/misc/lvm-version.h lib/snapshot/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/Makefile test/Makefile test/api/Makefile tools/Makefile udev/Makefile"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure # This file is a shell script that caches the results of configure
@ -16157,6 +16157,7 @@ do
"man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
"po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;; "po/Makefile") CONFIG_FILES="$CONFIG_FILES po/Makefile" ;;
"scripts/clvmd_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/clvmd_init_red_hat" ;; "scripts/clvmd_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/clvmd_init_red_hat" ;;
"scripts/cmirrord_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/cmirrord_init_red_hat" ;;
"scripts/lvm2_monitoring_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_monitoring_init_red_hat" ;; "scripts/lvm2_monitoring_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_monitoring_init_red_hat" ;;
"scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
"test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;

View File

@ -1175,6 +1175,7 @@ liblvm/liblvm2app.pc
man/Makefile man/Makefile
po/Makefile po/Makefile
scripts/clvmd_init_red_hat scripts/clvmd_init_red_hat
scripts/cmirrord_init_red_hat
scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_init_red_hat
scripts/Makefile scripts/Makefile
test/Makefile test/Makefile

View File

@ -32,7 +32,16 @@ MAN8=lvchange.8 lvconvert.8 lvcreate.8 lvdisplay.8 lvextend.8 lvm.8 \
vgck.8 vgcreate.8 vgconvert.8 vgdisplay.8 vgexport.8 vgextend.8 \ vgck.8 vgcreate.8 vgconvert.8 vgdisplay.8 vgexport.8 vgextend.8 \
vgimport.8 vgimportclone.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 \ vgimport.8 vgimportclone.8 vgmerge.8 vgmknodes.8 vgreduce.8 vgremove.8 \
vgrename.8 vgs.8 vgscan.8 vgsplit.8 $(FSADMMAN) vgrename.8 vgs.8 vgscan.8 vgsplit.8 $(FSADMMAN)
MAN8CLUSTER=clvmd.8 cmirrord.8
ifneq ("@CLVMD@", "none")
MAN8CLUSTER=clvmd.8
else
MAN8CLUSTER=
endif
ifeq ("@BUILD_CMIRRORD@", "yes")
MAN8CLUSTER+=cmirrord.8
endif
MAN8DM=dmsetup.8 MAN8DM=dmsetup.8
MAN5DIR=${mandir}/man5 MAN5DIR=${mandir}/man5
MAN8DIR=${mandir}/man8 MAN8DIR=${mandir}/man8

5
man/cmirrord.8.in Normal file
View File

@ -0,0 +1,5 @@
.TH CMIRRORD 8 "LVM TOOLS #VERSION#" "Red Hat Inc" \" -*- nroff -*-
.SH NAME
cmirrord
.SH SYNOPSIS
.B cmirrord

View File

@ -30,4 +30,4 @@ endif
install_lvm2: install install_lvm2: install
DISTCLEAN_TARGETS += clvmd_init_red_hat lvm2_monitoring_init_red_hat DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat lvm2_monitoring_init_red_hat

View File

@ -1,71 +1,71 @@
#!/bin/bash #!/bin/bash
# #
# chkconfig: - 22 78 # chkconfig: - 22 78
# description: Loads/Unloads dm-log-clustered module # description: Starts and stops cmirrord
# #
# For Red-Hat-based distributions such as Fedora, RHEL, CentOS.
# #
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: cmirrord # Provides: cmirrord
# Required-Start: $network $time # Required-Start: $network $time $local_fs
# Required-Stop: $network $time # Required-Stop: $network $time $local_fs
# Short-Description: Starts and stops cmirrord # Short-Description: Starts and stops cmirrord
# Description: Starts and stops the cluster mirror log daemon # Description: Starts and stops the cluster mirror log daemon
### END INIT INFO ### END INIT INFO
. /etc/init.d/functions . /etc/init.d/functions
# set secure PATH DAEMON=cmirrord
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/sbin"
LOCK_FILE="/var/lock/subsys/$DAEMON"
start() start()
{ {
echo -n "Starting clustered mirror log server:" if ! pidof $DAEMON > /dev/null
ps -C cmirrord >& /dev/null || cmirrord >& /dev/null then
echo -n "Starting $DAEMON: "
rtrn=$? daemon $DAEMON $CLVMDOPTS
if [ $rtrn -eq 0 ]; then rtrn=$?
success "startup" echo
else if [ $rtrn -ne 0 ]
failure "startup" then
break
fi
fi fi
# need the extra echo to properly terminate the line
echo
return $rtrn return $rtrn
} }
stop() stop()
{ {
echo -n "Stopping clustered mirror log server:" echo -n "Stopping $DAEMON:"
killall cmirrord >& /dev/null killproc $DAEMON -TERM
for ((i=0; $i < 10; i++)); do rtrn=$?
if ! ps -C cmirrord >& /dev/null; then
break; return $rtrn
fi }
wait_for_finish()
{
count=0
while [ "$count" -le 10 -a -n "`pidof $DAEMON`" ]
do
sleep 1 sleep 1
count=$((count + 1))
done done
if [ $i -ge 10 ]; then if [ `pidof $DAEMON` ]
failure "shutdown" then
echo
return 1 return 1
else else
success "shutdown" return 0
fi fi
echo
return $rtrn
} }
cmirror_status() cmirror_status()
{ {
ps -C cmirrord >& /dev/null status $DAEMON
if [ $? -ne 0 ]; then
echo "Cluster log server is not running. (Cluster mirrors will not work.)"
return 1
fi
return 0
} }
rtrn=1 rtrn=1
@ -75,16 +75,21 @@ case "$1" in
start) start)
start start
rtrn=$? rtrn=$?
[ $rtrn = 0 ] && touch $LOCK_FILE
;; ;;
stop) stop)
stop stop
rtrn=$? rtrn=$?
[ $rtrn = 0 ] && rm -f $LOCK_FILE
;; ;;
restart) restart)
$0 stop if stop
$0 start then
wait_for_finish
start
fi
rtrn=$? rtrn=$?
;; ;;