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/resize-part-image

#!/bin/sh
#
#    cloud-resize-image - resize a cloud image
#
#    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/>.


Usage() {
	cat <<EOF
Usage: ${0##*/} [ options ] image size [output]
   Resize a partition image and contained filesystem to a new size.
   if output is given, do not modify 'image', but create new file 'output'

   New size is specified per resize2fs(8), e.g. "1G" for 1 gigabyte

   options:
      -v | --verbose    show command output
EOF
	return 0
}

error() { echo "$@" 1>&2; }
fail() { [ $# -eq 0 ] || error "$@"; exit 1; }

human2bytes() {
	# converts size suitable for input to resize2fs to bytes
	# s:512 byte sectors, K:kilobytes, M:megabytes, G:gigabytes
	# none: block size of the image
	local input=${1} defunit=${2:-1024}
	local unit count;
	case "$input" in
		*s) count=${input%s}; unit=512;;
		*K) count=${input%K}; unit=1024;;
		*M) count=${input%M}; unit=$((1024*1024));;
		*G) count=${input%G}; unit=$((1024*1024*1024));;
		*)  count=${input}  ; unit=${2:-1024};;
	esac
	_RET=$((${count}*${unit}))
}

xtruncate() {
	if which truncate >/dev/null 2>&1; then
		truncate "${@}"
	else
		local size=${1} file=${2} blk=""
		size=${size#--size=}
		# this is a poor mans truncate supporting whatever human2bytes supports
		human2bytes "${size}" && blk=$((${_RET}/512)) &&
			dd if=/dev/zero of="${file}" obs=512 seek=${blk} count=0 2>/dev/null
	fi
}

runcmd() {
	local output=$1
	shift;
	if [ "$output" = "0" ]; then
		local out="" ret=0;
		out=$("${@}" 2>&1) || { ret=$?; error "${out}"; return $ret; }
	else
		"$@"
	fi
}

[ "$1" = "-h" -o "$1" = "--help" ] && { Usage; exit 0; }

verbose=0
[ "$1" = "-v" -o "$1" = "--verbose" ] &&
	{ verbose=1; shift; }

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

[ $# -eq 3 -o $# -eq 2 ] || { Usage 1>&2; exit 1; }

old="$1"
size="$2"
new="${3:-${old}}"

[ -f "${old}" ] || fail "${old}: does not exist"

human2bytes "${size}" && new_size=${_RET} ||
	fail "failed to understand ${size}"

if [ ! "${old}" -ef "${new}" ]; then
	file_out=$(file "${old}") || fail "failed to read ${old} with 'file'"
	case "${file_out}" in
		*gzip\ compressed*)
			file_out_z=$(file -z "${old}")
			case "${file_out_z}" in
				*tar\ archive*)
					: > "${new}" && newd=$(dirname "${new}") ||
						fail "failed to get full path for ${new}"
					tmpd=$(mktemp -d "${newd}/.${0##*/}.XXXXXX") &&
						( cd "${tmpd}" && tar -S --wildcards -xzf - "*.img" &&
						  mv *.img "../${new}" ) < "${old}" || { 
						  rm -Rf "${tmpd}";
						  fail "failed to extract image from ${old}"
						}
					rm -Rf "${tmpd}"
					;;
				*)
					zcat -f "$old" | cp --sparse=always /dev/stdin "$new";;
			esac
			;;
		*) cp --sparse=always "${old}" "${new}";;
	esac
	[ $? -eq 0 ] || fail "failed to cp ${old} -> ${new}"
else
	# if old=new (in place), it must be a simple image file
	case "${old}" in
		*.gz) fail "refusing work in place compressed or archive file: ${old}";;
	esac
fi

ls_out=$(ls -l "${new}") &&
	old_size=$(echo "${ls_out}" | awk '{print $5}') ||
	fail "failed to get size of ${new_img}"

runcmd "${verbose}" e2fsck -fp "${new}" ||
	fail "failed to fsck ${new}"

if [ "${old_size}" -lt "${new_size}" ]; then
	xtruncate "--size=$size" "$new" || fail "failed to change size of ${new}"
fi

runcmd "${verbose}" resize2fs "$new" "$size" ||
	fail "failed to resize ${new} -> ${size}"

if [ "${old_size}" -gt "${new_size}" ]; then
	xtruncate "--size=$size" "$new" || fail "failed to change size of ${new}"
fi

echo "resized ${new} to ${size}"

exit 0

# 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