From ed339866f7933cef97a86616439b74a70da46180 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 15:38:38 -0600 Subject: [PATCH 1/7] Avoid a crash when a system fails Prime95 --- .bin/Scripts/functions/osticket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/osticket.py b/.bin/Scripts/functions/osticket.py index 5ec9529e..f7ab8b77 100644 --- a/.bin/Scripts/functions/osticket.py +++ b/.bin/Scripts/functions/osticket.py @@ -350,7 +350,7 @@ class osTicket(): # Enable CoreStorage searches results['Core'] = False - if results['Full Diag']: + if results['Dev Type'] == 'Disk' and results['Full Diag']: num_passed = results['Passed'] + results['N/A'] + results['OVERRIDE'] if num_passed == len(test_list): # We ran all disk tests and all results were acceptable From e99f16300f835388fbfc6cdc044296ca37b0d4fd Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 20:01:16 -0600 Subject: [PATCH 2/7] Escape single quotes before posting to osTicket * Only done for the post body for now --- .bin/Scripts/functions/osticket.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/osticket.py b/.bin/Scripts/functions/osticket.py index f7ab8b77..4b3c5adf 100644 --- a/.bin/Scripts/functions/osticket.py +++ b/.bin/Scripts/functions/osticket.py @@ -524,7 +524,7 @@ class osTicket(): sql_cmd += " VALUES (" sql_cmd += " '{}',".format(ticket_id) sql_cmd += " '{ID}', '{Name}',".format(**OSTICKET['Staff']) - sql_cmd += " '{}',".format(response) + sql_cmd += " '{}',".format(response.replace("'", "\\'")) sql_cmd += " '{}'".format(time.strftime("%Y-%m-%d %H:%M:%S")) sql_cmd += " );" From 5784a3c6dac6e9f86386683a5be93e2dcc2bf8cb Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 20:08:37 -0600 Subject: [PATCH 3/7] Disable warning when saving non ODF/default type --- .bin/Scripts/settings/setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/.bin/Scripts/settings/setup.py b/.bin/Scripts/settings/setup.py index e3f504cc..4b402bd7 100644 --- a/.bin/Scripts/settings/setup.py +++ b/.bin/Scripts/settings/setup.py @@ -201,6 +201,7 @@ LIBREOFFICE_XCU_DATA = ''' Impress MS PowerPoint 2007 XML Calc MS Excel 2007 XML MS Word 2007 XML +false ''' From 3d4fc4c3f3232401369167f15fa4b20ae9d39622 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 20:15:44 -0600 Subject: [PATCH 4/7] Show driver pack names in SDIO --- .bin/_Drivers/SDIO/sdi.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/_Drivers/SDIO/sdi.cfg b/.bin/_Drivers/SDIO/sdi.cfg index 45b0e7c2..d3cec2ea 100644 --- a/.bin/_Drivers/SDIO/sdi.cfg +++ b/.bin/_Drivers/SDIO/sdi.cfg @@ -21,4 +21,4 @@ -uplimit:1 -connections:0 --expertmode -showdrpnames2 -onlyupdates -preservecfg -novirusalerts +-expertmode -showdrpnames2 -onlyupdates -preservecfg -novirusalerts -showdrpnames2 From 2ff8690a6647afd445c533f31008d1056da68a58 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 20:45:25 -0600 Subject: [PATCH 5/7] Avoid crash in HW-Diags --quick * The LogDir wasn't being created before being used. --- .bin/Scripts/functions/hw_diags.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.bin/Scripts/functions/hw_diags.py b/.bin/Scripts/functions/hw_diags.py index ec5b2373..8746ed79 100644 --- a/.bin/Scripts/functions/hw_diags.py +++ b/.bin/Scripts/functions/hw_diags.py @@ -623,14 +623,18 @@ class State(): v['Objects'] = [] # Update LogDir - if not self.quick_mode: + if self.quick_mode: + global_vars['LogDir'] = '{}/Logs/{}'.format( + global_vars['Env']['HOME'], + time.strftime('%Y-%m-%d_%H%M_%z')) + else: global_vars['LogDir'] = '{}/Logs/{}_{}'.format( global_vars['Env']['HOME'], get_ticket_number(), time.strftime('%Y-%m-%d_%H%M_%z')) - os.makedirs(global_vars['LogDir'], exist_ok=True) - global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( - global_vars['LogDir']) + os.makedirs(global_vars['LogDir'], exist_ok=True) + global_vars['LogFile'] = '{}/Hardware Diagnostics.log'.format( + global_vars['LogDir']) self.progress_out = '{}/progress.out'.format(global_vars['LogDir']) # Add CPU From 61f2ab5777ae87e3043138ed598a43d31297323b Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 20:46:48 -0600 Subject: [PATCH 6/7] Avoid replacing .conkyrc if nothing changed * This prevents conky from reloading every 30 seconds --- .../include_x/airootfs/etc/skel/.update_conky | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.linux_items/include_x/airootfs/etc/skel/.update_conky b/.linux_items/include_x/airootfs/etc/skel/.update_conky index 0e45e13d..18005927 100755 --- a/.linux_items/include_x/airootfs/etc/skel/.update_conky +++ b/.linux_items/include_x/airootfs/etc/skel/.update_conky @@ -1,24 +1,31 @@ #!/bin/bash +CONFIG_BASE="${HOME}/.conkyrc_base" +CONFIG_NEW="${HOME}/.conkyrc_new" +CONFIG_REAL="${HOME}/.conkyrc" + IF_LIST=($(ip l \ | egrep '^[0-9]+:\s+(eth|en|wl)' \ | sed -r 's/^[0-9]+:\s+(\w+):.*/\1/' \ | sort)) -# Reset conkyrc to default -rm "${HOME}/.conkyrc" -cp "${HOME}/.conkyrc_base" "${HOME}/.conkyrc" +# Build new config from the default +rm "${CONFIG_NEW}" +cp "${CONFIG_BASE}" "${CONFIG_NEW}" -# Add interfaces to conkyrc +# Add interfaces to conkyrc_new for i in "${IF_LIST[@]}"; do if [[ "${i:0:1}" == "e" ]]; then - sed -i -r "s/#Network/Wired:\${alignr}\${addr $i}\n#Network/" $HOME/.conkyrc + sed -i -r "s/#Network/Wired:\${alignr}\${addr $i}\n#Network/" "${CONFIG_NEW}" else - sed -i -r "s/#Network/Wireless:\${alignr}\${addr $i}\n#Network/" $HOME/.conkyrc + sed -i -r "s/#Network/Wireless:\${alignr}\${addr $i}\n#Network/" "${CONFIG_NEW}" fi done -# Remove '#Network' line to prevent duplicating lines if this script is re-run -sed -i -r "s/#Network//" $HOME/.conkyrc +# Replace config if there were changes +if ! diff -q "${CONFIG_NEW}" "${CONFIG_REAL}" >/dev/null 2>&1; then + rm "${CONFIG_REAL}" + cp "${CONFIG_NEW}" "${CONFIG_REAL}" +fi # vim: sts=2 sw=2 ts=2 From ae488138e05a5d82a2d71b2d9a3703d792999cae Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Wed, 29 May 2019 21:10:21 -0600 Subject: [PATCH 7/7] Missed a rEFInd wallpaper section, switched to PNG --- Build Linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Build Linux b/Build Linux index 6f709a77..d4cd653d 100755 --- a/Build Linux +++ b/Build Linux @@ -165,7 +165,7 @@ function update_live_env() { # Boot config (UEFI) mkdir -p "$LIVE_DIR/EFI/boot" cp "/usr/share/refind/refind_x64.efi" "$LIVE_DIR/EFI/boot/bootx64.efi" - cp "$ROOT_DIR/Images/rEFInd.jpg" "$LIVE_DIR/EFI/boot/rEFInd.jpg" + cp "$ROOT_DIR/Images/rEFInd.png" "$LIVE_DIR/EFI/boot/rEFInd.png" rsync -aI "/usr/share/refind/drivers_x64/" "$LIVE_DIR/EFI/boot/drivers_x64/" rsync -aI "/usr/share/refind/icons/" "$LIVE_DIR/EFI/boot/icons/" --exclude "/usr/share/refind/icons/svg" sed -i "s/%ARCHISO_LABEL%/${label}/" "$LIVE_DIR/EFI/boot/refind.conf"