Skip to content

Instantly share code, notes, and snippets.

@b10n1k
b10n1k / Asset.sh
Created January 30, 2025 07:49 — forked from JoeyBurzynski/Asset.sh
Bash Scripting: Check if a Bash Variable Has Been Set (Or Is Empty String)
# How to determine if a bash variable is empty?
# A variable in bash (and any POSIX-compatible shell) can be in one of three states:
#
# unset
# set to the empty string
# set to a non-empty string
# Most of the time you only need to know if a variable is set to a non-empty string, but occasionally it's important to distinguish between unset and set # to the empty string.
#
screen -S openqa -X quit
#!/bin/bash
SESSION_NAME="openqa"
LOG_DIR="/var/log/odev/logs"
## created manual
## mkdir -p $LOG_DIR
echo "Starting openQA services in a new screen session: $SESSION_NAME"
echo "Logs will be stored in $LOG_DIR"
#!/bin/bash
SESSION_NAME="openqa"
LOG_DIR="/var/log/odev/logs"
## created manual
## mkdir -p $LOG_DIR
echo "Starting openQA services in a new screen session: $SESSION_NAME"
echo "Logs will be stored in $LOG_DIR"
Sep 22 01:03:00 qesapworker-prg5 auditd[2506]: Audit daemon rotating log files
Sep 22 01:15:21 qesapworker-prg5 systemd[1]: Starting Backup /etc/sysconfig directory...
Sep 22 01:15:21 qesapworker-prg5 systemd[1]: backup-sysconfig.service: Deactivated successfully.
Sep 22 01:15:21 qesapworker-prg5 systemd[1]: Finished Backup /etc/sysconfig directory.
Sep 22 01:24:34 qesapworker-prg5 dbus-daemon[2511]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.1433' (uid=0 pid=51510 comm="/usr/bin/python3 /usr/bin/salt-minion ")
Sep 22 01:24:34 qesapworker-prg5 systemd[1]: Starting DBus interface for snapper...
Sep 22 01:24:34 qesapworker-prg5 dbus-daemon[2511]: [system] Successfully activated service 'org.opensuse.Snapper'
Sep 22 01:24:34 qesapworker-prg5 systemd[1]: Started DBus interface for snapper.
Sep 22 01:24:53 qesapworker-prg5 systemd[1]: var-lib-openqa-share.automount: Got hangup/error on autofs pipe from kernel. Likely our automount point has been un
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<mode>
<confirm config:type="boolean">false</confirm>
</mode>
</general>
<networking>
<!-- okurz: 2023-06-13: For multiple network interfaces by default the last is configured, prefer the first -->
# GENERATED FILE - DO NOT EDIT
set -eo pipefail
for f in /home/iob/Documents/Work/qatools_repos/openqa-trigger-from-obs/t/obs/openSUSE:Factory:Staging:B/{files_,Media}*.lst; do
[ ! -f "$f" ] || : > "$f"
done
[ ! -f /home/iob/Documents/Work/qatools_repos/openqa-trigger-from-obs/t/obs/openSUSE:Factory:Staging:B/../rsync.secret ] || rsync_pwd_option=--password-file=/home/iob/Documents/Work/qatools_repos/openqa-trigger-from-obs/t/obs/openSUSE:Factory:Staging:B/../rsync.secret
rsync -4 --list-only $rsync_pwd_option obspublish-stage::openqa/openSUSE:Factory:Staging:B/images/x86_64/kiwi-templates-Minimal:kvm-and-xen/ | grep -o '.*Minimal.*kvm-and-xen.*\.qcow2$' | awk '{ $1=$2=$3=$4=""; print substr($0,5); }' | grep -E 'x86_64' >> /home/iob/Documents/Work/qatools_repos/openqa-trigger-from-obs/t/obs/openSUSE:Factory:Staging:B/files_iso.lst
PERL5LIB=lib/perlcritic:$PERL5LIB perlcritic lib
lib/OpenQA.pm source OK
lib/DBIx/Class/Timestamps.pm source OK
lib/OpenQA/App.pm source OK
lib/OpenQA/CLI.pm source OK
lib/OpenQA/Client.pm source OK
lib/OpenQA/Events.pm source OK
lib/OpenQA/JobGroupDefaults.pm source OK
lib/OpenQA/ScreenshotDeletion.pm source OK
::warning file=lib/OpenQA/WebSockets.pm,line=82,col=27,title=Useless interpolation of literal string - severity 3::[ValuesAndExpressions::ProhibitInterpolationOfLiterals] See page 51 of PBP
1c1
< theme = community + openqa
---
> theme = freenode
3d2
< include = strict ValuesAndExpressions::ProhibitInterpolationOfLiterals
5,35c4,5
< verbose = ::warning file=%f,line=%l,col=%c,title=%m - severity %s::[%p] %e\n
<
< # == Perlcritic Policies
defaults:
x86_64:
machine: 64bit
priority: 50
aarch64:
machine: aarch64
priority: 50
products:
sle-12-SP5-HPC-Updates-aarch64:
distri: sle