-- Leo's gemini proxy

-- Connecting to gemini.ctrl-c.club:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

_ _ _ _ _ _ _

___ _ _ _ _ ___ ____ __ ___ _ _ __(_) |__(_) (_) |_(_)___ ___

/ _ \ ' \ | '_/ -_|_-< '_ \/ _ \ ' \(_-< | '_ \ | | | _| / -_|_-<

\___/_||_| |_| \___/__/ .__/\___/_||_/__/_|_.__/_|_|_|\__|_\___/__/

|_|


intro - why I've become like that


I'm uncertain if I've consistently assumed responsibilities, but I've always made an effort to do so.


I've long believed that taking responsibility, even in a professional setting, reflects strenght rather than weakness. Even when I wasn't in a position to be shielded from consequences, I tried to safegued the interests of my loved ones, hoping that the efforts I put in would eventually yield positive results. I can't say if this approach resonates with everyone.


Nowadays, I occasionally find myself in a position where I must make judgments, and I'm becoming more aware of how prevalent the tendency to avoid responsibility, shift blame onto others, and declare "it's not my fault" is.


Perhaps the fear of job loss is the driving factor behind this behavior. However, I often realize that receiving constructive feedback can be a valuable incentive to rectify recurring mistakes. The primary objective should be learning, rather than just going through the motions of completing tasks.


That being said, I'm not entirely convinced that simplifying tasks for those with a "it's not my fault" mentality is the definitive way to promote learning. Nevertheless, having scripts at your disposal can be advantageous for a couple of reasons. Firstly, they allow you to perform tasks swiftly, and secondly, the time saved can be used to review the code and potentially enhance it. Today, I've begun crafting a simple script to incorporate into tasks for the "sensitive" machines that require manual updates.



python code /begin


import subprocess


def run_command_with_message(message, command):

print(message)

subprocess.call(command, shell=True)


print("Checking for upgradable packages...")


result = subprocess.check_output("sudo yum list updates", shell=True, universal_newlines=True)


print(result)


if "kernel" in result:

update_kernel_choice = raw_input("A new kernel update is available. Do you want to update it? (yes/no): ").strip().lower()


if update_kernel_choice == "yes":

run_command_with_message("Running 'yum update' for the kernel...", "sudo yum update kernel")

else:

print("Skipping 'yum update' for the kernel.")

else:

print("No kernel updates found.")


upgrade_choice = raw_input("Do you want to manually update all other packages (excluding the kernel)? (yes/no): ").strip().lower()


if upgrade_choice == "yes":

run_command_with_message("Updating all other packages (excluding the kernel)...", "sudo yum update -y --exclude=kernel*")

print("Package upgrade completed (excluding the kernel).")

else:

print("Package upgrade skipped.")


print("Script completed.")


python code /end

-- Response ended

-- Page fetched on Sun May 19 03:28:27 2024