Ask Your Question
0

Bash script software removals and installs

asked 2018-08-20 15:15:45 -0600

tablepc gravatar image

updated 2018-08-20 15:18:16 -0600

This is in regard to my trying to automate as much of bare metal from scratch installs on PCs as I can. Each install is with me setting at the PC with the install DVD loaded in the PC.

I currently have three bash script files to do all the software removals and installs to get to the configuration used here. The first script has about 12 removals that come first (dnf remove -y software name). These are followed by a number of installs (dnf install -y software name). The other two scripts are just installs. There are about 20 actions (removal or installs) in each script. I currently do a restart before running each script.

Back in the days before linux I learned through experience that one should not do more than one software install on a system before doing a warm reboot so that all the little final tasks could get done. Failure to do these reboots could lead to a lot of work.

Lately as you see from above I have been getting more relaxed on this and so far everything has been all right.

I am seeking advise. Is the way I am doing this a bad idea? Is there a better way to do this? I would really like to do all the removals and installs in one script. Would that be a hugely bad idea? I looked briefly at using Ansible, but scripts are so much easier than figuring out Ansible.

Just for reference, I don't know if it matters, but after the software is all set. I have another script I run with a long sequence of gsettings commands to get the gnome settings configured as needed. I used gsettings because it has error checking that Dconf doesn't. That was a big help as I dedugged. Now that I have all but a few running with gsettings. it would be a lot of work to put them all in Dconf format for use in Ansible.

Thanks in advance for your help on this.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-08-20 15:52:15 -0600

florian gravatar image

You could use Kickstart to automate the entire install process of the machines.

If that's an overkill for what you need/want, just merge your script into 1 script, including your gsettings commands, without reboots in between. Reboot when you are done with the script.

edit flag offensive delete link more

Comments

Thanks a lot! I'll merge my scripts and that will save some time. I've saved the link to Kickstart. It will be a while until I have time to study that. Again Thanks!

tablepc gravatar imagetablepc ( 2018-08-21 07:20:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-08-20 15:15:45 -0600

Seen: 45 times

Last updated: Aug 20 '18