2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

add sys log for redhat statelite (#5771)

* add sys log for redhat statelite
This commit is contained in:
Yuan Bai 2018-11-07 16:47:46 +08:00 committed by Bin Xu
parent e04cff48e1
commit 13bca11a9d
10 changed files with 147 additions and 52 deletions

View File

@ -1,6 +1,8 @@
#!/bin/sh
#script to update nodelist.nodestatus during provision
XCAT="$(getarg XCAT=)"
STATEMNT="$(getarg STATEMNT=)"
MASTER=`echo $XCAT |awk -F: '{print $1}'`
getarg nonodestatus
@ -11,8 +13,12 @@ if [ $? -ne 0 ]; then
XCATIPORT="3002"
fi
log_label="xcat.deployment"
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..."
[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS"
if [ $NODESTATUS -ne 0 ];then
logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..."
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
fi

View File

@ -13,8 +13,12 @@ if [ $? -ne 0 ]; then
XCATIPORT="3002"
fi
log_label="xcat.deployment"
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..."
[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS"
if [ $NODESTATUS -ne 0 ];then
logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..."
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
fi

View File

@ -1,9 +1,13 @@
#!/bin/sh
log_label="xcat.deployment"
NEWROOT=/sysroot
SERVER=${SERVER%%/*}
SERVER=${SERVER%:}
RWDIR=.statelite
XCAT="$(getarg XCAT=)"
xcatdebugmode="$(getarg xcatdebugmode=)"
XCATMASTER=$XCAT
MASTER=`echo $XCATMASTER |awk -F: '{print $1}'`
STATEMNT="$(getarg STATEMNT=)"
if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess
SNAPSHOTSERVER=${STATEMNT%:*}
@ -17,6 +21,9 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other
fi
fi
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..."
echo Setting up Statelite
mkdir -p $NEWROOT
@ -27,14 +34,18 @@ MAXTRIES=7
ITER=0
if [ ! -e "$NEWROOT/$RWDIR" ]; then
echo ""
echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... "
msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... "
echo "$msg"
echo ""
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
/bin/sh
fi
if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then
echo ""
echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode"
msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with the -m statelite mode"
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
echo ""
/bin/sh
fi
@ -59,15 +70,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Possible problems:
msg="Your are dead, rpower $ME boot to play again.
Possible problems:
1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ?
2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
/bin/sh
exit
fi
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
msg="Trying again in $RS seconds..."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
sleep $RS
done
@ -78,13 +93,17 @@ if [ ! -z $SNAPSHOTSERVER ]; then
while ! umount -l $NEWROOT/$RWDIR/persistent; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Cannot umount $NEWROOT/$RWDIR/persistent."
msg="Your are dead, rpower $ME boot to play again.
Cannot umount $NEWROOT/$RWDIR/persistent."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
/bin/sh
exit
fi
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
msg="Trying again in $RS seconds..."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
sleep $RS
done
@ -93,20 +112,26 @@ if [ ! -z $SNAPSHOTSERVER ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
msg="Your are dead, rpower $ME boot to play again.
Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
echo $msg
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
/bin/sh
exit
fi
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
msg="Trying again in $RS seconds..."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
sleep $RS
done
fi
# TODO: handle the dhclient/resolv.conf/ntp, etc
echo "Get to enable localdisk"
logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..."
echo "Enable localdisk ..."
$NEWROOT/etc/init.d/localdisk
logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..."
$NEWROOT/etc/init.d/statelite
READONLY=yes
export READONLY
@ -174,3 +199,4 @@ fi
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh
# force udevsettle to break
> $hookdir/initqueue/work
logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot"

View File

@ -168,6 +168,7 @@ elif [ -r /rootimg-statelite.gz ]; then
echo ""
echo "The /$RWDIR directory doesn't exist in the rootimg... "
echo ""
logger $SYSLOGHOST -t $log_label -p local4.err "The /$RWDIR directory doesn't exist in the rootimg..."
/bin/sh
fi
@ -175,6 +176,7 @@ elif [ -r /rootimg-statelite.gz ]; then
echo ""
echo "$NEWROOT/etc/init.d/statelite doesn't exist... "
echo ""
logger $SYSLOGHOST -t $log_label -p local4.err "$NEWROOT/etc/init.d/statelite doesn't exist... "
/bin/sh
fi
@ -208,10 +210,12 @@ elif [ -r /rootimg-statelite.gz ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "You are dead, rpower $ME boot to play again."
echo "Possible problems:
msg="You are dead, rpower $ME boot to play again.
Possible problems:
1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ?
2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.err "$msg"
/bin/sh
exit
fi
@ -227,8 +231,10 @@ elif [ -r /rootimg-statelite.gz ]; then
while ! umount -l $NEWROOT/$RWDIR/persistent; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Cannot umount $NEWROOT/$RWDIR/persistent."
msg="Your are dead, rpower $ME boot to play again.
Cannot umount $NEWROOT/$RWDIR/persistent."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.err "$msg"
/bin/sh
exit
fi
@ -242,8 +248,10 @@ elif [ -r /rootimg-statelite.gz ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
msg="Your are dead, rpower $ME boot to play again.
Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.err "$msg"
/bin/sh
exit
fi
@ -253,7 +261,9 @@ elif [ -r /rootimg-statelite.gz ]; then
done
fi
logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..."
$NEWROOT/etc/init.d/localdisk
logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..."
$NEWROOT/etc/init.d/statelite
fastboot=yes
export fastboot

View File

@ -1,5 +1,4 @@
#!/bin/bash
set -x
#!/bin/sh
#script to update nodelist.nodestatus during provision
XCAT="$(getarg XCAT=)"
@ -14,8 +13,12 @@ if [ $? -ne 0 ]; then
XCATIPORT="3002"
fi
log_label="xcat.deployment"
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..."
[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS"
if [ $NODESTATUS -ne 0 ];then
logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..."
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
fi

View File

@ -1,10 +1,13 @@
#!/bin/bash
set -x
log_label="xcat.deployment"
NEWROOT=/sysroot
SERVER=${SERVER%%/*}
SERVER=${SERVER%:}
RWDIR=.statelite
XCAT="$(getarg XCAT=)"
xcatdebugmode="$(getarg xcatdebugmode=)"
XCATMASTER=$XCAT
MASTER=`echo $XCATMASTER |awk -F: '{print $1}'`
STATEMNT="$(getarg STATEMNT=)"
if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other than nfs open, will u se // to detect uri in the future I guess
SNAPSHOTSERVER=${STATEMNT%:*}
@ -18,6 +21,9 @@ if [ ! -z $STATEMNT ]; then #btw, uri style might have left future options other
fi
fi
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
logger $SYSLOGHOST -t $log_label -p local4.info "Executing xcat-prepivot to set up statelite..."
echo Setting up Statelite
mkdir -p $NEWROOT
@ -28,14 +34,18 @@ MAXTRIES=7
ITER=0
if [ ! -e "$NEWROOT/$RWDIR" ]; then
echo ""
echo "This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... "
msg="This NFS root directory doesn't have a /$RWDIR directory for me to mount a rw filesystem. You'd better create it... "
echo "$msg"
echo ""
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
/bin/sh
fi
if [ ! -e "$NEWROOT/etc/init.d/statelite" ]; then
echo ""
echo "$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with th e -m statelite mode"
msg="$NEWROOT/etc/init.d/statelite doesn't exist. Perhaps you didn't create this image with the -m statelite mode"
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
echo ""
/bin/sh
fi
@ -60,15 +70,19 @@ if [ ! -z $SNAPSHOTSERVER ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Possible problems:
msg="Your are dead, rpower $ME boot to play again.
Possible problems:
1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ?
2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
/bin/sh
exit
fi
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
msg="Trying again in $RS seconds..."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
sleep $RS
done
@ -79,13 +93,17 @@ if [ ! -z $SNAPSHOTSERVER ]; then
while ! umount -l $NEWROOT/$RWDIR/persistent; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Cannot umount $NEWROOT/$RWDIR/persistent."
msg="Your are dead, rpower $ME boot to play again.
Cannot umount $NEWROOT/$RWDIR/persistent."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.error "$msg"
/bin/sh
exit
fi
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
msg="Trying again in $RS seconds..."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
sleep $RS
done
@ -94,20 +112,26 @@ if [ ! -z $SNAPSHOTSERVER ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
msg="Your are dead, rpower $ME boot to play again.
Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
echo $msg
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
/bin/sh
exit
fi
RS=$(( $RANDOM % 20 ))
echo "Trying again in $RS seconds..."
msg="Trying again in $RS seconds..."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.info "$msg"
sleep $RS
done
fi
# TODO: handle the dhclient/resolv.conf/ntp, etc
echo "Get to enable localdisk"
logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..."
echo "Enable localdisk ..."
$NEWROOT/etc/init.d/localdisk
logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..."
$NEWROOT/etc/init.d/statelite
READONLY=yes
export READONLY
@ -175,3 +199,4 @@ fi
echo 'settle_exit_if_exists="--exit-if-exists=/dev/root"; rm "$job"' > $hookdir/initqueue/xcat.sh
# force udevsettle to break
> $hookdir/initqueue/work
logger $SYSLOGHOST -t $log_label -p local4.info "Exit xcat-prepivot"

View File

@ -168,6 +168,7 @@ elif [ -r /rootimg-statelite.gz ]; then
echo ""
echo "The /$RWDIR directory doesn't exist in the rootimg... "
echo ""
logger $SYSLOGHOST -t $log_label -p local4.err "The /$RWDIR directory doesn't exist in the rootimg..."
/bin/sh
fi
@ -175,6 +176,7 @@ elif [ -r /rootimg-statelite.gz ]; then
echo ""
echo "$NEWROOT/etc/init.d/statelite doesn't exist... "
echo ""
logger $SYSLOGHOST -t $log_label -p local4.err "$NEWROOT/etc/init.d/statelite doesn't exist... "
/bin/sh
fi
@ -208,10 +210,12 @@ elif [ -r /rootimg-statelite.gz ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "You are dead, rpower $ME boot to play again."
echo "Possible problems:
msg="You are dead, rpower $ME boot to play again.
Possible problems:
1. $SNAPSHOTSERVER is not exporting $SNAPSHOTROOT ?
2. Is DNS set up? Maybe that's why I can't mount $SNAPSHOTSERVER."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.err "$msg"
/bin/sh
exit
fi
@ -227,8 +231,10 @@ elif [ -r /rootimg-statelite.gz ]; then
while ! umount -l $NEWROOT/$RWDIR/persistent; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Cannot umount $NEWROOT/$RWDIR/persistent."
msg="Your are dead, rpower $ME boot to play again.
Cannot umount $NEWROOT/$RWDIR/persistent."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.err "$msg"
/bin/sh
exit
fi
@ -242,8 +248,10 @@ elif [ -r /rootimg-statelite.gz ]; then
while ! mount $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME $NEWROOT/$RWDIR/persistent -o $MNT_OPTIONS; do
ITER=$(( ITER + 1 ))
if [ "$ITER" == "$MAXTRIES" ]; then
echo "Your are dead, rpower $ME boot to play again."
echo "Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
msg="Your are dead, rpower $ME boot to play again.
Possible problems: cannot mount to $SNAPSHOTSERVER:/$SNAPSHOTROOT/$ME."
echo "$msg"
logger $SYSLOGHOST -t $log_label -p local4.err "$msg"
/bin/sh
exit
fi
@ -253,7 +261,9 @@ elif [ -r /rootimg-statelite.gz ]; then
done
fi
logger $SYSLOGHOST -t $log_label -p local4.info "Enabling localdisk ..."
$NEWROOT/etc/init.d/localdisk
logger $SYSLOGHOST -t $log_label -p local4.info "Preparing mount points ..."
$NEWROOT/etc/init.d/statelite
fastboot=yes
export fastboot

View File

@ -1,6 +1,8 @@
#!/bin/sh
#script to update nodelist.nodestatus during provision
XCAT="$(getarg XCAT=)"
STATEMNT="$(getarg STATEMNT=)"
MASTER=`echo $XCAT |awk -F: '{print $1}'`
getarg nonodestatus
@ -11,8 +13,12 @@ if [ $? -ne 0 ]; then
XCATIPORT="3002"
fi
log_label="xcat.deployment"
[ "$xcatdebugmode" = "1" -o "$xcatdebugmode" = "2" ] && SYSLOGHOST="" || SYSLOGHOST="-n $MASTER"
logger $SYSLOGHOST -t $log_label -p local4.info "=============deployment starting===================="
logger $SYSLOGHOST -t $log_label -p local4.info "Starting xcat-premount..."
[ "$xcatdebugmode" > "0" ] && logger $SYSLOGHOST -t $log_label -p local4.debug "MASTER=$MASTER XCATIPORT=$XCATIPORT NODESTATUS=$NODESTATUS"
if [ $NODESTATUS -ne 0 ];then
logger $SYSLOGHOST -t $log_label -p local4.info "Sending request to $MASTER:$XCATIPORT for changing status to netbooting..."
/tmp/updateflag $MASTER $XCATIPORT "installstatus netbooting"
fi

View File

@ -236,15 +236,13 @@ parsehttpserver ()
# Main
# parse the arguments
log_label="xcat.updatenode"
ARGNUM=$#;
if [ -z $1 ]; then
NODE_DEPLOYMENT=1
log_label="xcat.deployment"
echolog "info" "=============deployment starting===================="
else
NODE_DEPLOYMENT=0
log_label="xcat.updatenode"
echolog "info" "=============updatenode starting===================="
case $1 in
1|2|5)
MODE=$1
@ -299,9 +297,16 @@ else
fi
fi
;;
3|4|6) MODE=$1;;
4)
MODE=$1
log_label="xcat.deployment"
;;
3|6) MODE=$1;;
esac
fi
if [ $NODE_DEPLOYMENT -ne 1 ] && [ $MODE -ne 4 ] ; then
echolog "info" "=============updatenode starting===================="
fi
# set the default path for the xcatpost directory
xcatpost="/xcatpost"
# Check for debug mode and you have nodename available you can change the path for debug

View File

@ -22,7 +22,7 @@ fi
if [ -n "$LOGLABEL" ]; then
log_label=$LOGLABEL
else
log_label="xcat"
log_label="xcat.deployment"
fi
XCATSERVER=$(grep --only-matching "\<XCAT=[^ ]*\>" /proc/cmdline |cut -d= -f2 |cut -d: -f1 2>/dev/null)