One Hat Cyber Team
Your IP :
216.73.216.216
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
backup
/
oldserver
/
2
/
bin
/
View File Name :
jscal-store
#!/bin/sh # Stores the current calibration settings for the given joystick # (materialized by its device). The calibration settings are stored # using the joystick's name and serial number if available, and its # vendor and product codes if it's a USB device. If none of these can # be determined, the settings are stored against the device name. if [ -z "$1" ]; then echo "Usage: $0 {device}" echo "Stores the device's calibration for future use." exit 1 fi if [ ! -x /sbin/udevadm ]; then echo Storing joystick configuration requires udev! >&2 exit 1 fi ident=$(mktemp) /sbin/udevadm info -a -n $1 | /usr/libexec/joystick/ident > $ident . $ident rm $ident STORE=/var/lib/joystick/joystick.state if [ ! -d $(dirname $STORE) ]; then mkdir -p $(dirname $STORE) if [ $? -gt 0 ]; then echo Unable to create directory $(dirname $STORE)! >&2 exit 1 fi fi # Filter the existing file if [ -f $STORE ]; then if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then echo "No product name or vendor available, calibration will be stored for the" echo "given device name ($DEVICE) only!" /usr/libexec/joystick/filter kernel="$DEVICE" < $STORE > $STORE.new else /usr/libexec/joystick/filter name="$NAME" serial="$SERIAL" vendor="$VENDOR" product="$PRODUCT" < $STORE > $STORE.new fi fi # Append the new calibration information if [ -f $STORE.new ] && [ ! -z "$(cat $STORE.new)" ]; then echo >> $STORE.new fi if [ -z "$NAME" ] && [ -z "$VENDOR" ]; then echo "DEVICE=\"$DEVICE\"" >> $STORE.new fi if [ ! -z "$NAME" ]; then echo "NAME=\"$NAME\"" >> $STORE.new fi if [ ! -z "$SERIAL" ]; then echo "SERIAL=\"$SERIAL\"" >> $STORE.new fi if [ ! -z "$VENDOR" ]; then echo "VENDOR=\"$VENDOR\"" >> $STORE.new fi if [ ! -z "$PRODUCT" ]; then echo "PRODUCT=\"$PRODUCT\"" >> $STORE.new fi # First store the axes mapping, then the calibration # as they must be restored in the same order jscal -q $1 | cut -d' ' -f-3 >> $STORE.new jscal -p $1 | cut -d' ' -f-3 >> $STORE.new if [ -f $STORE ]; then mv $STORE $STORE.old fi mv $STORE.new $STORE rm -f $STORE.old