/usr/bin/cm is in config-manager 0.4-2.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | #!/bin/bash
# config-manager is transitioning from being a C++ binary
# to being a Python script. Unfortunately this means that
# not all features of the C++ binary are supported by the
# Python version.
# Here we attempt to detect if the features being requested
# only require the Python version otherwise we default to
# using the binary
# the last argument is supposed to be the config
if [ -r $BASH_ARGV ]; then
CMFILE=$BASH_ARGV
fi
if [ "X$CMFILE" == "X" ]; then
# It ain't a file, so we'll punt and invoke the Python one
exec /usr/lib/config-manager/cm.py "$@"
fi
# okay, we have a config file (supposedly)
# let's strip out any comments first
TMPCMFILE=`/bin/tempfile`
if [ $? -ne 0 ]; then
printf "$0: failed to create temporary file\n"
exit 1
fi
grep -v "^#" $CMFILE >> $TMPCMFILE
# now, with our temporary file, if we only
# find 'http' we should be able to use the
# python version, otherwise it'll be the C++ one
COUNT=`grep -c -v http $TMPCMFILE`
/bin/rm -f $TMPCMFILE
if [ "X$COUNT" == "X0" ]; then
exec /usr/lib/config-manager/cm.py "$@"
else
exec /usr/lib/config-manager/cm.bin "$@"
fi
|