Ganteng Doang Upload Shell Gak Bisa


Linux server.jmdstrack.com 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
/ usr/ bin/

//usr/bin/cloud-publish-tarball

#!/bin/sh
#
#    cloud-publish-tarball - wrapper for publishing cloud tarballs
#
#    Copyright (C) 2010 Canonical Ltd.
#
#    Authors: Scott Moser <smoser@canonical.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, version 3 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.


EC2PRE=${EC2PRE:-euca-}
TMPD=""
VERBOSITY=1
error() { echo "$@" 1>&2; }
debug() { 
	[ ${VERBOSITY} -ge $1 ] || return 0; 
	shift
	error "$@"
}
log() { debug "$1" "$(date): ====== $2 ======" ; }
fail() { [ $# -eq 0 ] || error "$@"; exit 1; }
cleanup() {
	[ -n "${TMPD}" -a -d "${TMPD}" ] || return 0;
	debug 2 "cleaning up ${TMPD}"
	rm -Rf "${TMPD}";
}
bad_Usage() { Usage 1>&2; [ $# -eq 0 ] || error "$@"; exit 1; }
Usage() {
	cat <<EOF
Usage: ${0##*/} [ options ] tarfile bucket [arch]

   register a UEC tarball (ie, per http://cloud-images.ubuntu.com)
   if arch is not provided, a name-based attempt is made to guess
   tarfile may be a url

   options:
           --hook-img e       invoke 'e' with full path to downloaded disk image
      -k | --kernel  k        use previously registered kernel with id 'k'
                              specify 'none' for no kernel
      -K | --kernel-file f    bundle, upload, use file 'f' as kernel
           --rename-kernel k  rename kernel to 'k' (applies to loader)
      -r | --ramdisk r        use previously registered ramdisk with id 'r'
                              specify 'none' for no ramdisk
      -R | --ramdisk-file f   bundle, upload, use file 'f' as ramdisk
           --rename-ramdisk r rename ramdisk to 'r'
           --resize  s        resize the partition image before uploading
                              's' must be valid input to cloud-resize-image
           --save-downloaded  if the image is a url, save it to '.'
      -q | --quiet            be quiet, only output published ids
      -l | --use-loader       use the loader kernel rather than linux kernel
           --rename-image f   rename image to 'f' before publishing

   Example:
   - ${0##*/} lucid-cloud-i386.tar.gz my-lucid-bucket i386
EOF
}

upload_register() {
	local out="" ret=0
	out=$(cloud-publish-image "${@}") || {
		ret=$?
		printf "%s" "${out}"
		return $ret
	}
	set -- ${out}
	_RET=${1}
}

dl() {
	# dl url, target, quiet
	local url=${1} target=${2} quiet=${3:-1}
	if [ -f "${url}" ]; then
		[ "${target}" = "-" ] && { cat "$url"; return; }
		cp "$url" "$target"
		return
	fi
	local qflag="-q"
	[ "$quiet" = "0" ] && qflag=""

	wget $qflag --progress=dot:mega "$url" -O "$target" ||
		return 1
}

dl_input_image() {
	# this downloads an image if necessary and sets _RET to location of image
	local input="$1" save_dir="${2:-.}" ret="" quiet=0
	[ $VERBOSITY -eq 0 ] && quiet=1 # this differs from cloud-publish-image
	case "$input" in
		file://*)
			ret="$save_dir/${input##*/}"
			dl "${input#file://}" "$ret" $quiet || return $?;;
		http://*|ftp://*|https://*)
			ret="$save_dir/${input##*/}"
			dl "$input" "$ret" $quiet || return $?
			;;
		*) ret="$input";;
	esac
	_RET="$ret"
}

[ "${CLOUD_UTILS_WARN_UEC:-0}" = "0" ] && _n="${0##*/}" && [ "${_n#uec}" != "${_n}" ] &&
	error "WARNING: '${0##*/}' is now to 'cloud${_n#uec}'. Please update your tools or docs" &&
	export CLOUD_UTILS_WARN_UEC=1

short_opts="hlk:K:qr:R:"
long_opts="help,hook-img:,kernel:,kernel-file:,quiet,use-loader,ramdisk:,ramdisk-file:,rename-image:,rename-kernel:,rename-ramdisk:,resize:,save-downloaded"
getopt_out=$(getopt --name "${0##*/}" --shell sh \
	--options "${short_opts}" --long "${long_opts}" -- "$@") &&
	eval set -- "${getopt_out}" ||
	bad_Usage

ramdisk=""
kernel=""
loader=""
eki=""
eri=""
image=""
emi=""
resize=""
use_loader=0
rename_image=""
rename_kernel=""
rename_ramdisk=""
save_dl=0
hook_img=""

while [ $# -ne 0 ]; do
	cur=${1}; next=${2};
	case "$cur" in
		--) shift; break;;
		-h|--help) Usage; exit 0;;
		   --hook-img)
			[ -z "${hook_img}" ] || bad_Usage "only one --hook-img supported";
			[ -x "$next" ] || bad_Usage "--hook-img is not executable"
			hook_img=$(readlink -f "$next") ||
				bad_Usage "could not find full path to $next"
			hook_img="$next"
			shift;;
		-k|--kernel) eki=${next}; shift;;
		-K|--kernel-file)
			[ -f "${next}" ] && kernel=$(readlink -f "${next}") ||
				fail "failed to get path to ${next}"
			shift;;
		-q|--quiet) VERBOSITY=0;;
		-r|--ramdisk) eri=${next}; shift;;
		-R|--ramdisk-file)
			[ -f "${next}" ] && ramdisk=$(readlink -f "${next}") ||
				fail "failed to get path to ${next}"
			shift;;
		   --rename-image) rename_image=${next}; shift;;
		   --rename-kernel) rename_kernel=${next}; shift;;
		   --rename-ramdisk) rename_ramdisk=${next}; shift;;
		   --save-downloaded) save_dl=1;;
		   --use-loader) use_loader=1;;
		   --resize) resize=${next}; shift;;
	esac
	shift;
done

tarball=${1}
bucket=${2}
arch=${3}

[ $# -eq 3 -o $# -eq 2 ] || bad_Usage

[ -n "${eki}" -a ${use_loader} -ne 0 ] &&
	bad_Usage "--use-loader is incompatible with --kernel"

if [ -z "${arch}" ]; then
	case "${tarball}" in
		*i386*) arch=i386;;
		*amd64*|*x86_64*) arch=amd64;;
		*) fail "unable to guess arch by tarball name. give 3rd arg";;
	esac
fi

[ "$arch" = "amd64" ] && iarch="x86_64" || iarch="${arch}"

# before extracting the tarball, try to verify that the environment
# is set up, by invoking another euca command (LP: #526504)
${EC2PRE}describe-images >/dev/null ||
	fail "Unable to run ${EC2PRE}-describe-images.  Is environment for ${EC2PRE} set up?"

utmp=${TEMPDIR:-${TMPDIR:-/tmp}}
TMPD=$(mktemp -d "${utmp}/${0##*/}.XXXXXX") || fail "failed make temp"
trap cleanup EXIT

save_dir="${TMPD}"
[ $save_dl -eq 1 ] && save_dir=$PWD

dl_input_image "$tarball" "$save_dir" && tarball="$_RET" ||
	fail "failed to download image $image to $save_dir"

[ -f "${tarball}" ] && tbf=$(readlink -f "${tarball}") ||
	fail "bad tarball: ${tarball}";

start=$PWD

cd "${TMPD}"

log 1 "extracting image"
tar -S -xvzf "${tbf}" >list.out || fail "failed extract ${tarball}";

while read x; do
	[ -f "${x}" ] || continue
	case "$x" in
		*vmlinuz*)
			[ -z "${kernel}" -a -z "${eki}" ] && kernel=${x};;
		*initrd*)
			[ -z "${ramdisk}" -a -z "${eri}" ] && ramdisk=${x};;
		*.img) image=${x};;
		*-loader) [ -z "${loader}" ] && loader=${x};;
	esac
done < list.out

[ -z "${image}" ] && fail "can't find image";

[ -z "${loader}" -a ${use_loader} -eq 1 ] &&
	fail "--use-loader specified, but no loader found in tarball"

# if loader was found, and no kernel given (or found)
# then set kernel to loader
if [ -n "${loader}" ] &&
	{ [ ${use_loader} -eq 1 ] || [ -z "${kernel}" -a -z "${eki}" ]; } ; then
	debug 1 "using loader ${loader##*/} as kernel"
	kernel=${loader}
fi

[ -n "${kernel}" -o -n "${eki}" ] ||
	bad_Usage "can't find kernel. specify '--kernel none' to register none";
[ -n "${ramdisk}" -o -n "${eri}" ] || {
	debug 1 "Warning: no ramdisk found, assuming '--ramdisk none'"
	eri="none";
}

debug 1 "kernel : ${eki:-${kernel}}"
debug 1 "ramdisk: ${eri:-${ramdisk}}"
debug 1 "image  : ${image##*/}"

if [ -n "${resize}" ]; then
	log 1 "resizing ${image##*/} to ${resize}"
	out=$(resize-part-image "${image}" "${resize}" 2>&1) || {
		error "${out}";
		fail "failed to resize image file to ${resize}";
	}
fi

if [ -n "${kernel}" ]; then
	log 1 "bundle/upload kernel"
	upload_register --type kernel \
		${rename_kernel:+"--rename=${rename_kernel}"} \
		"${iarch}" "${kernel}" "${bucket}" ||
		fail "failed to upload kernel"
	eki=${_RET}
fi

if [ -n "${ramdisk}" ]; then
	log 1 "bundle/upload ramdisk"
	upload_register --type ramdisk \
		${rename_ramdisk:+"--rename=${rename_ramdisk}"} \
		"${iarch}" "${ramdisk}" "${bucket}" ||
		fail "failed ramdisk bundle/upload"
	eri=${_RET}
fi

log 1 "bundle/upload image"
upload_register --type image \
	${rename_image:+"--rename=${rename_image}"} \
	${hook_img:+"--hook-img=${hook_img}"} \
	"${iarch}" "${image}" "${bucket}" \
	--kernel "${eki}" --ramdisk "${eri}" ||
		fail "failed bundle/upload/register of image"
emi=${_RET}

log 1 "done"
printf 'emi="%s"; eri="%s"; eki="%s";\n' "${emi}" "${eri}" "${eki}"

# vi: ts=4 noexpandtab
			
			


Thanks For 0xGh05T - DSRF14 - Mr.Dan07 - Leri01 - FxshX7 - AlkaExploiter - xLoveSyndrome'z - Acep Gans'z

JMDS TRACK – Just Another Diagnostics Lab Site

Home

JMDS TRACK Cameroon

Boost the productivity of your mobile ressources


Make An Appointment


Fleet management

  1. Reduce the operting cost and the unavailability of your vehicles
  2. reduce the fuel consumption of your fleet
  3. Improve the driving dehavior and safety of your drivers
  4. optimize the utilization rate of your equipment 
  5. protect your vehicle against theft
  6. Improve the quality of your customer service


Find out more

Assets management

  1. Track the roaming of your equipment
  2. Optimise the management of your assets on site and during transport
  3. Secure the transport of your goods
  4. Make your team responsible for preventing the loss of tools, equipment
  5. Take a real-time inventory of your equipment on site
  6. Easily find your mobile objects or equipment



Find out more



Find out more

Antitheft solutions

  1. Secure your vehicles and machinery and increase your chances of recovering them in the event of theft
  2. Protect your assets and reduce the costs associated with their loss
  3. Combine immobiliser and driver identification and limit the risk of theft
  4. Identify fuel theft and reduce costs
  5. Protect your goods and take no more risks
  6. Be alerted to abnormal events

Our Location

 Douala BP cité 

     and

Yaoundé Total Essos


Make An Appointment


Get Directions

682230363/ 677481892

What makes us different from others

  • young and dynamic team
  • call center 24/24 7/7
  • roaming throughout Africa
  • team of developers who can develop customer-specific solutions
  • diversity of services
  • reactive and prompt after-sales service when soliciting a customer or a malfunction
  • Free Maintenance and installation in the cities of Douala and Yaounde

https://youtu.be/xI1cz_Jh2x8

15+
years of experience in GPS system development, production and deployment.

15 Collaborators

More than 15 employees dedicated to the research and development of new applications and to customer care

5 000 Vehicles and mobile assets

5 000 vehicles and mobile assets under management, in Africa

Our Partners










Latest Case Studies

Our current projects 

5/5
Bon SAV , SATISFAIT DU TRAITEMENT DES REQUETES

M DIPITA CHRISTIAN
Logistic Safety Manager Road Safety Manager
5/5
La réactivité de JMDS est excellente
Nous restons satisfait dans l’ensemble des prestations relatives a la couverture de notre parc automobile

Hervé Frédéric NDENGUE
Chef Service Adjoint de la Sécurité Générale (CNPS)
5/5
L’APPLICATION EMIXIS est convivial A L’utilisation
BEIG-3 SARL
DIRECTOR GENERAL
5/5
Nevertheless I am delighted with the service
MR. BISSE BENJAMIN
CUSTOMER

Subsribe To Our Newsletter

Stay in touch with us to get latest news and special offers.



Address JMDS TRACK

Douala bp cité



and

YAOUNDE Total Essos

Call Us

+237682230363



Email Us


info@jmdstrack.cm