Compare commits

..

No commits in common. "main" and "0.2.1" have entirely different histories.
main ... 0.2.1

415 changed files with 6750 additions and 7717 deletions

View File

@ -5,560 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.1.3] - 2025-08-08
### Fixed
- Fix parsing of the output of '/bin/ip -json'
## [1.1.2] - 2025-07-31
### Changed
- Try several encodings on hivexregedit output
## [1.1.1] - 2025-07-29
### Fixed
- Correctly decode hivexregedit UTF-16LE output
## [1.1.0] - 2025-07-24
### Changed
- Have CrearImagenGit not receive the "tag" parameter
## [1.0.3] - 2025-07-24
### Fixed
- Have GetGitData deal with the fact that .git may be a regular file
## [1.0.2] - 2025-07-24
### Changed
- Write listSoftwareInfo errors in the log
## [1.0.1] - 2025-07-23
### Fixed
- Fixed small bugs in the py init scripts
## [1.0.0] - 2025-07-18
### Changed
- Renamed scripts so they don't have .py extension
## [0.30.1] - 2025-07-17
### Changed
- Have wrappers fail if functions return None
## [0.30.0] - 2025-07-17
### Added
- Add script for getting data out of deployed git images
## [0.29.0] - 2025-07-17
### Changed
- Now Configurar.py takes a third parameter: whether just check stuff or not
## [0.28.0] - 2025-07-17
### Changed
- Use python init scripts by default
## [0.27.0] - 2025-07-16
### Added
- Add python init scripts
## [0.26.1] - 2025-07-14
### Changed
- Change sort order in `_getAllDisks()`
## [0.26.0] - 2025-07-14
### Fixed
- Overhaul partitioning
## [0.25.2] - 2025-07-14
### Fixed
- Run initCache.py rather than just initCache
## [0.25.1] - 2025-07-11
### Changed
- Derive a strong password from the default opengnsys weak one
## [0.25.0] - 2025-07-11
## Added
- Add ogGit functionality
## [0.24.0] - 2025-07-11
### Added
- Configure and run filebeat
## [0.23.2] - 2025-07-07
### Changed
- Improved error reporting in ogCreateCache
## [0.23.1] - 2025-07-04
### Fixed
- Don't fail if grub.cfg is not found
## [0.23.0] - 2025-07-03
### Removed
- Remove several bash scripts under "scripts" and "interfaceAdm"
## [0.22.8] - 2025-07-03
### Removed
- Remove unused "cacheopts"
## [0.22.7] - 2025-07-03
### Fixed
- Fix dstat--show bandwith in the local cgi
## [0.22.6] - 2025-07-03
### Changed
- Include own IP address in the local CGI's title
## [0.22.5] - 2025-07-02
### Fixed
- Fixed booting windows using winboot/kexec
## [0.22.4] - 2025-07-01
### Changed
- Do copy grub.cfg :) and clean it up on boot
- Remove warning about /dev/loop0
- Comment unused code out
## [0.22.3] - 2025-06-27
### Changed
- Don't copy grub.cfg
## [0.22.2] - 2025-06-27
### Fixed
- Don't check rc of updateBootCache.py because we may have no cache partition
## [0.22.1] - 2025-06-27
### Fixed
- Included some changes that should be in the previous version
## [0.22.0] - 2025-06-26
### Changed
- Changed torrent client from ctorrent to aria2c
- Updated ogCreateTorrent function replaced ctorrent with mktorrent
## [0.21.1] - 2025-06-26
### Fixed
- Fixed syntax and other errors
## [0.21.0] - 2025-06-25
### Changed
- Prevent Configurar.py from messing with the browser
## [0.20.3] - 2025-06-25
### Fixed
- Fixed bugs when partitioning disks
## [0.20.2] - 2025-06-24
### Changed
- Do a couple of ogExecAndLog()s also when creating images
## [0.20.1] - 2025-06-24
### Changed
- Fix mark for ogboot on linux
## [0.20.0] - 2025-06-24
### Changed
- In order to have /tmp/command.log updated in realtime, ogExecAndLog now spawns a subprocess rather than calling functions directly
## [0.19.2] - 2025-06-24
### Changed
- Write a mark for ogboot on linux only
## [0.19.1] - 2025-06-23
### Fixed
- Fixed path of EFI boot entry
## [0.19.0] - 2025-06-23
### Changed
- Write a mark for ogboot
## [0.18.2] - 2025-06-19
### Fixed
- Accept None as partition type
## [0.18.1] - 2025-06-18
### Fixed
- Look for grub.cfg in two places rather than one
## [0.18.0] - 2025-06-16
### Added
- Added scripts and libs for oggit
## [0.17.0] - 2025-06-16
### Changed
- Removed useless warning about /dev/loop0
- Fix windows EFI booting, and a typo
## [0.16.0] - 2025-06-12
### Changed
- Gave some care to the "Custom" scripts
## [0.15.3] - 2025-06-12
### Fixed
- Create missing dir
## [0.15.2] - 2025-06-11
### Fixed
- Fixed a condition check
## [0.15.1] - 2025-06-11
### Fixed
- Add a missing "import"
- Fix retrieving windows version from the registry
- Fix bug while building the "Part-01-01" string
- Removed obsolete unused "bootOS" scripts (with a capital "S")
## [0.15.0] - 2025-06-10
### Changed
- Remove opengnsys bash functions from the agent's environment
## [0.14.2] - 2025-06-09
### Fixed
- Get rc of bash pipelines in ProtocolLib
## [0.14.1] - 2025-06-07
### Fixed
- Fixed rc management in deployImage.py
## [0.14.0] - 2025-06-07
### Changed
- Read $ogusetls and $ogverifytls from the environment and configure stunnel accordingly
## [0.13.9] - 2025-06-04
### Fixed
- Copy grub.cfg so that grub finds the config upon boot
## [0.13.8] - 2025-06-03
### Fixed
- Paid attention to return codes between python (True for success) and shell (0 for success)
## [0.13.7] - 2025-06-02
### Fixed
- Fixed management of the "multicast session" parameter
## [0.13.6] - 2025-06-02
### Fixed
- Fixed variable name in restoreImage.py
## [0.13.5] - 2025-05-30
### Fixed
- Return a true value from the unicast/multicast methods
- Fully qualify a method call
## [0.13.4] - 2025-05-28
### Changed
- Show sgdisk output
## [0.13.3] - 2025-05-28
### Fixed
- unlink() only existing files
## [0.13.2] - 2025-05-28
### Changed
- Point urlMenu back to the localhost stunnel
## [0.13.1] - 2025-05-21
### Changed
- Make dbus envvar available to the agent
## [0.13.0] - 2025-05-19
### Added
- Run dbus
## [0.12.0] - 2025-05-18
### Changed
- no tls for the urlmenu either
## [0.11.0] - 2025-05-18
### Added
- Run stunnel and point the browser to it
## [0.10.0] - 2025-05-14
### Changed
- Run the new browser
## [0.9.0] - 2025-05-09
### Added
- Use zstd when creating and restoring images
## [0.8.4] - 2025-05-09
### Added
- When restoring an image, include the image name in the ogagent configuration file
## [0.8.3] - 2025-05-08
### Fixed
- Have ogNvramAddEntry() handle EFI entries with spaces in them
## [0.8.2] - 2025-05-07
### Changed
- Have Configurar.py ignore the tch parameter, take cache size from the definition of the cache partition
## [0.8.1] - 2025-05-07
### Fixed
- Gracefully handle error in ogBoot() when not finding /boot partition in target's fstab
## [0.8.0] - 2025-04-23
### Added
- Have the oglive agent send /stopped on poweroff or restart
## [0.7.2] - 2025-04-21
### Fixed
- Have the partitioning functions return a meaningful rc
## [0.7.1] - 2025-04-15
### Fixed
- getConfiguration.py: don't fail if NTFS filesystems are mounted ro
## [0.7.0] - 2025-04-15
### Removed
- Removed references to ogGlobals.OGLOG in python code
## [0.6.1] - 2025-04-15
### Fixed
- Fixed capturing of partclone output and management of return value
## [0.6.0] - 2025-04-15
### Changed
- ogGetIpAddress() is no longer required in ogGlobals--move it back into NetLib
## [0.5.0] - 2025-04-15
### Changed
- Log to /var/log/clone-engine.log and clone-engine.json.log
## [0.4.1] - 2025-04-10
### Fixed
- restoreImage.py: return negated rc to the shell
## [0.4.0] - 2025-04-10
### Changed
- Make /opt/opengnsys writable in clients, just like it used to be
## [0.3.6] - 2025-04-09
### Fixed
- Fixed ogReduceFs
## [0.3.5] - 2025-04-09
### Fixed
- Fixed syntax
## [0.3.4] - 2025-04-09
### Fixed
- Fixed usage of ogEcho in FileSystemLib
## [0.3.3] - 2025-04-09
### Fixed
- Kill coproc'ed browser in all execution branches in Configurar.py
## [0.3.2] - 2025-04-07
### Fixed
- Handle invalid number of arguments pass to functions/ogCopyFile
## [0.3.1] - 2025-04-03
### Fixed
- Fixed invocation to ogCheckIpAddress in interfaceAdm/CrearImagen.py
## [0.3.0] - 2025-04-03
### Removed
- Removed burg and rsync 3.1
## [0.2.6] - 2025-03-31
### Fixed
- Restore qt4 browser
## [0.2.5] - 2025-03-31
### Fixed
- Don't require protoopts in interfaceAdm/RestaurarImagen.py
## [0.2.4] - 2025-03-28
### Removed
- Removed burg, QT4 stuff, rsync 3.1 and the old browser
## [0.2.3] - 2025-03-28
### Fixed
- Fixed some errors in Configurar.py, ogCreateCache, ogCreatePartitions and initCache.py
## [0.2.2] - 2025-03-26
### Fixed
- Prevent EjecutarScript.py from capturing the output of the script
## [0.2.1] - 2025-03-26
### Fixed

View File

@ -48,22 +48,16 @@ pipeline {
}
}
}
stage('Generate Changelog (Nightly)'){
when {
branch 'main'
}
steps {
script {
def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME
def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL
generateDebianChangelog(env.BUILD_DIR, devName, devEmail,"nightly")
}
}
}
stage('Build') {
steps {
script {
construirPaquete(env.BUILD_DIR, "../artifacts", "172.17.8.68", "/var/tmp/opengnsys/debian-repo/ogclient")
dir("${env.BUILD_DIR}") {
sh '''
dpkg-buildpackage -us -uc
mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/
ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo/ogclient && mkdir -p /var/tmp/opengnsys/debian-repo/ogclient"
scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ogclient
'''
}
}
}
@ -75,24 +69,7 @@ pipeline {
}
agent { label 'debian-repo' }
steps {
script {
// Construir el patrón de versión esperado en el nombre del paquete
def versionPattern = "${env.TAG_NAME}-${env.BUILD_NUMBER}"
publicarEnAptly('/var/tmp/opengnsys/debian-repo/ogclient', 'opengnsys-devel', versionPattern)
}
}
}
stage ('Publish to Debian Repository (Nightly)') {
when {
branch 'main'
}
agent { label 'debian-repo' }
steps {
script {
// Construir el patrón de versión esperado en el nombre del paquete
def versionPattern = "-${env.BUILD_NUMBER}~nightly"
publicarEnAptly('/var/tmp/opengnsys/debian-repo/ogclient', 'nightly', versionPattern)
}
sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/ogclient/*.deb"
}
}
}

View File

@ -23,7 +23,13 @@ case "$1" in
cp -a "$OLD_FILE" "$NEW_FILE"
# Append our configuration
echo "include = /etc/samba/smb-ogclient.conf" >> "$OLD_FILE"
echo "include = /etc/samba/smb-ogclient.conf" >> "$NEW_FILE"
# Use ucf to handle the file update
ucf --debconf-ok "$NEW_FILE" "$OLD_FILE"
# Clean up
rm -f "$NEW_FILE"
# Reload Samba
if command -v systemctl >/dev/null 2>&1; then
@ -42,8 +48,6 @@ case "$1" in
;;
esac
chown -R opengnsys:opengnsys /opt/opengnsys/ogclient
chown -R opengnsys:opengnsys /opt/opengnsys/ogclient_log
#DEBHELPER#
exit 0

View File

@ -1,15 +0,0 @@
#!/bin/bash
set -e
# Asegurarse de que el usuario exista
USER="opengnsys"
HOME_DIR="/opt/opengnsys"
if id "$USER" &>/dev/null; then
echo "El usuario $USER ya existe."
else
echo "Creando el usuario $USER con home en $HOME_DIR."
useradd -m -d "$HOME_DIR" -s /bin/bash "$USER"
fi
exit 0

View File

@ -1,7 +1,7 @@
[ogclient]
comment = OpenGnsys Client
browseable = no
writeable = yes
writeable = no
locking = no
path = /opt/opengnsys/ogclient
guest ok = no

Binary file not shown.

View File

@ -1,49 +0,0 @@
#!/usr/bin/python3
# Proceso general de arranque de OpenGnsys Client.
import os
import re
import subprocess
import ogGlobals
from NetLib import ogGetIpAddress
ogstatus = os.environ.get ('ogstatus', '')
ogcore = os.environ.get ('ogcore', '')
oglog = os.environ.get ('oglog', '')
oggroup = os.environ.get ('OGGROUP', '')
ogactiveadmin = os.environ.get ('ogactiveadmin', '')
LANG = os.environ.get ('LANG', 'es_ES')
LANG = LANG[0:LANG.index('_')]
LOGLEVEL=5
# Matando plymount para inicir browser o shell
subprocess.run (['pkill', '-9', 'plymouthd'])
# Arranque de OpenGnsys Client daemon (socket).
print (ogGlobals.lang.MSG_LAUNCHCLIENT)
# Indicar fichero de teclado de Qt para el idioma especificado (tipo "es.qmap").
if os.path.exists (f'/usr/local/etc/{LANG}.qmap'):
os.environ['QWS_KEYBOARD'] = f'TTY:keymap=/usr/local/etc/{LANG}.qmap'
if os.path.exists ('/usr/share/OGAgent/opengnsys/linux/OGAgentService.py') and ogstatus != 'offline':
os.chdir ('/usr/share/OGAgent')
os.environ['OGAGENTCFG_OGCORE_IP'] = ogcore
os.environ['OGAGENTCFG_OGLOG_IP'] = oglog
os.environ['OGAGENTCFG_URLMENU_SCHEME'] = 'http'
os.environ['OGAGENTCFG_URLMENU_IP'] = '127.0.0.1'
os.environ['OGAGENTCFG_URLMENU_PORT'] = '81'
subprocess.run (['python3', '-m', 'opengnsys.linux.OGAgentService', 'fg'])
else:
ip = ogGetIpAddress()
OGMENU = ''
for FILE in [index, oggroup, ip]:
if not FILE: continue
m = f'{ogGlobals.OGCAC}/menus/{FILE}.html'
if os.path.exists (m): OGMENU = m
subprocess.run ([f'{ogGlobals.OPENGNSYS}/bin/launch_browser', m])
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
if ogactiveadmin == 'true':
subprocess.run (['bash'])

View File

@ -21,26 +21,20 @@ echo "${MSG_LAUNCHCLIENT:-.}"
if [ -f "/usr/share/OGAgent/opengnsys/linux/OGAgentService.py" -a "$ogstatus" != "offline" ]; then
# Ejecutar servicio cliente.
cd /usr/share/OGAgent
export OGAGENTCFG_OGCORE_IP=$ogcore
export OGAGENTCFG_OGCORE_IP=$ogcore
export OGAGENTCFG_OGLOG_IP=$oglog
export OGAGENTCFG_URLMENU_SCHEME=http
export OGAGENTCFG_URLMENU_IP=127.0.0.1
export OGAGENTCFG_URLMENU_PORT=81
(
## remove bash functions and some OG vars from the agent's environment
unset -f $(declare -F |awk '/og[A-Z]|NT[A-Z]/ { print $3 }')
unset $(declare |awk -F= '/^MSG_|^OG_ERR_/ { print $1 }')
python3 -m opengnsys.linux.OGAgentService fg
)
export OGAGENTCFG_URLMENU_IP=$ogcore
python3 -m opengnsys.linux.OGAgentService fg
else
for FILE in index $OGGROUP $(ogGetIpAddress)
do
[ -f $OGCAC/menus/$FILE.html ] && OGMENU="$OGCAC/menus/$FILE.html"
done
$OPENGNSYS/bin/launch_browser $OGMENU
echo "exec /usr/bin/OGBrowser $OGMENU" > /home/root/
/usr/bin/OGBrowser -qws $OGMENU
fi
# Si fallo en cliente y modo "admin", cargar shell; si no, salir.
if [ "$ogactiveadmin" == "true" ]; then
bash
fi
fi

View File

@ -1,44 +0,0 @@
#!/usr/bin/python3
## early init
import os
import sys
OPENGNSYS = os.environ.get ('OPENGNSYS', '/opt/opengnsys')
libs = [f'{OPENGNSYS}/lib/python3', '/usr/share/opengnsys-modules/python3/dist-packages']
os.environ['PYTHONPATH'] = ':'.join (libs)
for l in libs: sys.path.insert (0, l)
## end
import subprocess
import ogGlobals
from InitLib import loadenviron, write_profile, clean_esp, fileslinks, loadmodules, metadevs, mountrepo, poweroff, filebeat, stunnel, dbus, otherservices, runhttplog
IPV4ADDR = os.environ.get ('IPV4ADDR', '')
OG_IP = os.environ.get ('OG_IP', '')
loadenviron()
write_profile()
# Funciones de inicio.
clean_esp()
fileslinks()
loadmodules()
metadevs()
mountrepo()
poweroff()
filebeat()
stunnel()
dbus()
otherservices()
runhttplog()
if IPV4ADDR and os.path.exists (f'{ogGlobals.OGETC}/init/{IPV4ADDR}.sh'):
if OG_IP: subprocess.run ([f'{ogGlobals.OGETC}/init/{OG_IP}.sh'])
elif os.path.exists (f'{ogGlobals.OGETC}/init.py'):
subprocess.run ([f'{ogGlobals.OGETC}/init.py'])
else:
print ('No se ha encontrado script de inicio')
subprocess.run (['halt'])

View File

@ -1,12 +0,0 @@
#!/bin/bash
F=/opt/opengnsys/functions
## BootLib.bootOs() makes a copy of grub.cfg in /boot/grub within the ESP
## clean it up
if $F/ogIsEfiActive; then
ESP=$($F/ogGetEsp)
MNTPT=$($F/ogMount $ESP)
rm -f $MNTPT/boot/grub/grub.cfg
$F/ogUnmount $ESP
fi

View File

@ -1,19 +1,12 @@
#!/bin/bash
if grep -q pyinit=false /proc/cmdline; then
echo "shell init"
else
echo "python init"
exec /opt/opengnsys/etc/preinit.py
fi
# Cargar entorno de OpenGnsys
set -a
source /opt/opengnsys/etc/preinit/loadenviron.sh
# Scripts de inicio.
for f in cleanesp fileslinks loadmodules metadevs mountrepo poweroff filebeat otherservices; do
source $OGETC/preinit/$f.sh
for f in fileslinks loadmodules metadevs mountrepo poweroff otherservices; do
$OGETC/preinit/$f.sh
done
unset f

View File

@ -1,19 +0,0 @@
#!/bin/bash
F=/etc/filebeat/filebeat.yml
OPENSEARCH_PORT=9200
if [ -f $F ]; then
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 |sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/') ## taken from a sibling script
PASS=${PASS:-"og"}
PASS=OG+$(echo -n $PASS |sha256sum |cut -c1-12) ## og KDF
chmod 0600 $F
sed -i -e "s/__OGLOG_IP__/$oglog/g" \
-e "s/__OGLOG_PORT__/$OPENSEARCH_PORT/g" \
-e "s/__OPENSEARCH_PASSWORD__/$PASS/g" \
$F
unset PASS
mkdir -p /var/log/filebeat
/usr/bin/filebeat -c $F --path.home /usr/share/filebeat --path.config /etc/filebeat --path.data /var/lib/filebeat --path.logs /var/log/filebeat &
fi

View File

@ -7,71 +7,32 @@
#@date 2012-01-12
#*/
# Montar efivar filesystem
ogIsEfiActive && mount -t efivarfs none /sys/firmware/efi/efivars
# Lanzar servicios complementarios del cliente.
echo "${MSG_OTHERSERVICES:-.}"
# stunnel start
cat >/etc/stunnel/menu.conf <<__EOF__
setuid = stunnel4
setgid = stunnel4
pid = /var/run/stunnel4/menu.pid
foreground = yes
debug = info
[menu]
client = yes
accept = 127.0.0.1:81
connect = $ogcore:8443
__EOF__
if [[ true == "$ogusetls" ]]; then
if [[ true == "$ogverifytls" ]]; then
## use tls and verify
cat >>/etc/stunnel/menu.conf <<__EOF__
cert = /opt/opengnsys/etc/ogagent.crt
key = /opt/opengnsys/etc/ogagent.key
CAfile = /opt/opengnsys/etc/ca.crt
requireCert = yes
verifyChain = yes
__EOF__
else
## use tls but not verify
cat >>/etc/stunnel/menu.conf <<__EOF__
cert = /opt/opengnsys/etc/ogagent.crt
key = /opt/opengnsys/etc/ogagent.key
CAfile = /opt/opengnsys/etc/ca.crt
requireCert = no
verifyChain = no
__EOF__
fi
else
## don't use tls
cat >>/etc/stunnel/menu.conf <<__EOF__
requireCert = no
verifyChain = no
__EOF__
fi
mkdir -p /var/run/stunnel4; chown stunnel4:stunnel4 /var/run/stunnel4
stunnel /etc/stunnel/menu.conf &>/var/log/stunnel4/menu.log &
# stunnel end
# dbus
if [ -e /etc/dbus-1/system.d/ogbrowser.conf ]; then
mkdir -p /run/dbus
DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --print-address --system --nosyslog)
export DBUS_SESSION_BUS_ADDRESS
dbus-monitor --system &>/var/log/dbus-monitor.log &
fi
# Iniciar rsyslog, si es necesario.
[ -S /dev/log ] || service rsyslog start
# root password
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
# Adpatar la clave de "root" para acceso SSH.
PASS=$(grep "^[ ]*\(export \)\?OPTIONS=" /scripts/ogfunctions 2>&1 | \
sed 's/\(.*\)pass=\(\w*\)\(.*\)/\2/')
PASS=${PASS:-"og"}
echo -ne "$PASS\n$PASS\n" | passwd root 2>/dev/null
# Cargar el entorno OpenGnsys en conexión SSH.
cp -a $OPENGNSYS/etc/preinit/loadenviron.sh /etc/profile.d/
# Arrancar SSH.
/etc/init.d/ssh start &>/dev/null
#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1 ## apagado de monitor
ethtool -s $DEVICE wol g 2>/dev/null ## Activado WOL en la interfaz usada en arranque PXE.
# Desactivado apagado de monitor.
#setterm -blank 0 -powersave off -powerdown 0 < /dev/console > /dev/console 2>&1
# Activado WOL en la interfaz usada en arranque PXE.
ethtool -s $DEVICE wol g 2>/dev/null
# TODO Localizar correctamente el script de arranque.
[ -f /opt/opengnsys/scripts/runhttplog.sh ] && /opt/opengnsys/scripts/runhttplog.sh 2>/dev/null

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogAddCmd (args.disk, args.par, args.cmdfile, args.cmd)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogAddRegistryKey (args.mntpt, args.hive, args.k)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogAddRegistryValue (args.mntpt, args.hive, args.k, args.vtype)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -39,7 +39,6 @@ elif 4 == len (sys.argv):
elif 5 == len (sys.argv):
ret = ogBoot (args.disk, args.par, not not args.nvramperm, args.params)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -20,7 +20,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogBootLoaderDefaultEntry (args.disk, args.par, args.diskdefault, args.pardefault)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -20,7 +20,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogBootLoaderDeleteEntry (args.disk, args.par, args.diskdel, args.pardel)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -27,7 +27,6 @@ if 3 == len (sys.argv):
elif 5 == len (sys.argv):
ret = ogBootLoaderHidePartitions (args.disk, args.par, args.datadisk, args.datapar)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogBootLoaderOgliveDefaultEntry (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogBootLoaderSetTimeOut (args.disk, args.par, args.timeout)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogBootMbrGeneric (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogBootMbrXP (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -26,7 +26,6 @@ if 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogCalculateChecksum (container=f'{args.disk} {args.par}', file=args.file)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -26,7 +26,6 @@ if 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogCalculateFullChecksum (container=f'{args.disk} {args.par}', file=args.file)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogChangeRepo (args.ip_repo)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogCheckFs (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogCheckIpAddress (args.ip)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogCleanLinuxDevices (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogCleanOs (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogConfigureFstab (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogConfigureOgagent (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogCopyEfiBootLoader (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 5 == len (sys.argv):
args = parser.parse_args()
src = { 'container': args.src_container, 'file': args.src_file }
dst = { 'container': args.dst_container, 'file': args.dst_file }
elif 7 == len (sys.argv):
parser.add_argument ('src_disk')
parser.add_argument ('src_par')
@ -30,31 +29,6 @@ elif 7 == len (sys.argv):
args = parser.parse_args()
src = { 'disk': args.src_disk, 'par': args.src_par, 'file': args.src_file }
dst = { 'disk': args.dst_disk, 'par': args.dst_par, 'file': args.dst_file }
elif 4 == len (sys.argv):
## can be either:
## - src_container src_file dst_file
## - src_file dst_container dst_file
if 'REPO' == sys.argv[1] or 'CACHE' == sys.argv[1]:
## we are in "src_container src_file dst_file"
parser.add_argument ('src_container')
parser.add_argument ('src_file')
parser.add_argument ('dst_file')
args = parser.parse_args()
src = { 'container': args.src_container, 'file': args.src_file }
dst = { 'file': args.dst_file }
elif 'REPO' == sys.argv[2] or 'CACHE' == sys.argv[2]:
## we are in "src_file dst_container dst_file"
parser.add_argument ('src_file')
parser.add_argument ('dst_container')
parser.add_argument ('dst_file')
args = parser.parse_args()
src = { 'file': args.src_file }
dst = { 'container': args.dst_container, 'file': args.dst_file }
else:
ogHelp ('ogCopyFile', 'ogCopyFile [ str_repo | int_ndisk int_npartition ] path_source [ str_repo | int_ndisk int_npartition ] path_target', ['ogCopyFile REPO newfile.txt 1 2 /tmp/newfile.txt'])
sys.exit (1)
elif 6 == len (sys.argv):
## can be either:
## - src_disk src_par src_file dst_container dst_file
@ -62,7 +36,7 @@ elif 6 == len (sys.argv):
try:
num = int (sys.argv[1]) ## raises ValueError if sys.argv[1] doesn't look like a number
## we are in "src_disk src_par src_file dst_container dst_file"
## "src_disk src_par src_file dst_container dst_file"
parser.add_argument ('src_disk')
parser.add_argument ('src_par')
parser.add_argument ('src_file')
@ -72,7 +46,7 @@ elif 6 == len (sys.argv):
src = { 'disk': args.src_disk, 'par': args.src_par, 'file': args.src_file }
dst = { 'container': args.dst_container, 'file': args.dst_file }
except:
## we are in "src_container src_file dst_disk dst_par dst_file"
## "src_container src_file dst_disk dst_par dst_file"
parser.add_argument ('src_container')
parser.add_argument ('src_file')
parser.add_argument ('dst_disk')
@ -81,12 +55,8 @@ elif 6 == len (sys.argv):
args = parser.parse_args()
src = { 'container': args.src_container, 'file': args.src_file }
dst = { 'disk': args.dst_disk, 'par': args.dst_par, 'file': args.dst_file }
else:
ogHelp ('ogCopyFile', 'ogCopyFile [ str_repo | int_ndisk int_npartition ] path_source [ str_repo | int_ndisk int_npartition ] path_target', ['ogCopyFile REPO newfile.txt 1 2 /tmp/newfile.txt'])
sys.exit (1)
ret = ogCopyFile (src, dst)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -30,7 +30,6 @@ elif 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogCreateCache (ndsk=int(args.disk), part=int(args.part), sizecache=int(args.sizecache))
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -0,0 +1,23 @@
#!/usr/bin/python3
import sys
import argparse
from SystemLib import ogHelp
from DiskLib import ogCreateGptPartitions
if 2 == len (sys.argv) and 'help' == sys.argv[1]:
#parser.print_help() sale en inglés aunque la locale indique otra cosa
ogHelp ('ogCreateGptPartitions', 'ogCreateGptPartitions int_ndisk str_parttype:int_partsize ...', ['ogCreateGptPartitions 1 NTFS:10000000 EXT3:5000000 LINUX-SWAP:1000000'])
sys.exit (0)
parser = argparse.ArgumentParser (add_help=False)
parser.add_argument ('disk')
parser.add_argument ('parts', nargs='+')
args = parser.parse_args()
ret = ogCreateGptPartitions (args.disk, args.parts)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)
else: print (ret)

View File

@ -31,7 +31,6 @@ if 5 == len (sys.argv):
elif 7 == len (sys.argv):
ret = ogCreateImage (args.disk, args.par, args.container, args.imgfile, args.tool, args.level)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogCreateImageSyntax (args.dev, args.imgfile, args.tool, args.level)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -24,7 +24,6 @@ if 2 == len (sys.argv):
elif 3 == len (sys.argv):
ret = ogCreatePartitionTable (args.disk, args.createptt)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ args = parser.parse_args()
ret = ogCreatePartitions (args.disk, args.parts)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -25,8 +25,6 @@ if 4 == len (sys.argv):
ret = ogCreateTorrent (container=args.container, file=args.file, ip_bttrack=args.ip_bttrack)
elif 5 == len (sys.argv):
ret = ogCreateTorrent (disk=args.disk, par=args.par, file=args.file, ip_bttrack=args.ip_bttrack)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -7,7 +7,6 @@ from CacheLib import ogDeleteCache
ret = ogDeleteCache()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -26,7 +26,6 @@ if 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogDeleteFile (container=f'{args.disk} {args.par}', file=args.file)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogDeletePartitionTable (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogDeleteRegistryKey (args.mntpt, args.hive, args.k)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogDeleteRegistryValue (args.mntpt, args.hive, args.k)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -26,7 +26,6 @@ if 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogDeleteTree (container=f'{args.disk} {args.par}', file=args.file)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogDevToDisk (args.arg_dev)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogDiskToDev (args.arg_disk, args.arg_part)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogEcho (args.logtypes, args.loglevel, args.msg)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -48,7 +48,6 @@ for arg in sys.argv[1:]:
args = tuple (args)
ret = ogExecAndLog (logtypes, fun, *args, **kwargs)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogExtendFs (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogFindCache ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogFixBootSector (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -22,7 +22,6 @@ else:
args = parser.parse_args()
ret = ogFormat (args.disk, args.par, args.fs, args.label)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogFormatCache ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogFormatFs (args.disk, args.par, args.type, args.label)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetArch ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetBootMbr (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetCacheSize ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -7,7 +7,6 @@ from CacheLib import ogGetCacheSpace
ret = ogGetCacheSpace()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetCaller ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetDiskSize (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetDiskType (args.dev)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetEsp ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetFreeSize (args.disk, args.part, args.unit)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetFsSize (args.disk, args.par, args.unit)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetFsType (args.disk, args.part)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetHivePath (args.mntpt, args.hive)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetHostname ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetImageCompressor (args.container, args.filename)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetImageInfo (args.imgfile)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetImageProgram (args.container, args.filename)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetImageSize (args.repo, args.imgname)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetImageType (args.repo, args.imgname)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetIpAddress ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -24,7 +24,6 @@ if 2 == len (sys.argv):
elif 3 == len (sys.argv):
ret = ogGetLastSector (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetMacAddress ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetMountPoint (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetOsType (args.disk, args.partition)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetOsUuid (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetOsVersion (args.disk, args.part)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -26,7 +26,6 @@ if 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogGetParentPath (src=f'{args.disk} {args.par}', file=args.file)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetPartitionActive (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetPartitionId (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetPartitionSize (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetPartitionTableType (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetPartitionType (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetPartitionsNumber (args.disk)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -30,7 +30,6 @@ elif 3 == len (sys.argv):
elif 4 == len (sys.argv):
ret = ogGetPath (src=f'{args.disk} {args.par}', file=args.file)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -18,7 +18,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetRegistryValue (args.mntpt, args.hive, args.k)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetRepoIp ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -11,7 +11,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
ret = ogGetSerialNumber()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -16,7 +16,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetServerIp ()
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGetWindowsName (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -17,7 +17,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGrub4dosInstallMbr (args.disk, args.par)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGrubAddOgLive (args.disk, args.par, args.timeout, args.offline)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGrubDefaultEntry (args.disk, args.par, args.diskdefault, args.pardefault)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

View File

@ -19,7 +19,6 @@ if 2 == len (sys.argv) and 'help' == sys.argv[1]:
args = parser.parse_args()
ret = ogGrubDeleteEntry (args.disk, args.par, args.diskdel, args.pardel)
if ret is None: sys.exit (1)
if ret is not None:
if ret == True: sys.exit (0)
elif ret == False: sys.exit (1)

Some files were not shown because too many files have changed in this diff Show More