Jump to content

A couple of neat Arch scripts


securitybreach

Recommended Posts

securitybreach

First, here is an excellent script written by friend of mine, Alexander Diana (my co-owner of the Arch Community on G+). The script is for Archlinux but could work with other systemd based distros:

It is a small script which will grab common logs based on a user entered time (in minutes) ago the event happened, allowing a nice simple archive to be sent to those who need a log of the event to help debug in the Community/Forums.

 

For best results, run as a user that has full log/journal access (probably root, if you have not set it up otherwise).

http://ix.io/5B4

 

Just save the script as logs.sh and make it executable:

chmod +x whatever.sh

(change logs.sh to the name you choose).

 

 

wj3PHWB.png

 

3AsbdDg.png

 

 

The second script is called ArchDL:

http://ix.io/5Bi

https://github.com/G...aster/archdl.sh

 

This script lets you choose a mirror and downloads the latest Archlinux.iso from that mirror. The script also gives you the option of automatically checking the md5sum or sha1sum value:

 

b6QxFjp.png

 

UoJRh54.png

 

Enjoy!

  • Like 1
Link to comment
Share on other sites

abarbarian

Well I would have no idea what to do with the first script.An I can see that the second script is a neat way to get the latest Arch .iso. However I would rather use and encourage others to use torrents for mass file transfers.

a) you do not need a large infrastructure to make the files accessible

B) it promotes the use of torrents in a legal way

c) the more folk who use torrents the greater chance we have of maintaining freedom on the net

d)torrent seeding helps promote community spirit. ie, everyone can help out in a small way.

e)the man does not like torrents

f)smaller developers can make their work available with very little equipment wherever they are and stay in control.

etc etc.

 

:pirate:

  • Like 1
Link to comment
Share on other sites

securitybreach

Well I would have no idea what to do with the first script.

 

How so, its simple? Basically the script searches all logs (/var/log/*, dmesg and systemd logs) for errors and posts them along with a list all hardware information (lspci, lsusb, Xorg) in a nice archive.

 

For instance, you woke up this morning and your computer had shut off during the night. You know it was nothing electrical so it had to be software related. So you run this script which will parse the logs for errors, show your hardware info and your package logs (pacman.log). Then you upload the archive so others can help solve your issue. Instead of someone asking for the revelant info, this script will generate it in a nice little archive for you.

 

As far as the other script, it uses wget which is much faster than bittorrent (if the mirror is decent) and this script automatically checks the md5sum (or sha1sum) for you unlike bittorrent or using wget normally.

Link to comment
Share on other sites

The errors script seems like a handy tool. I just tried it in siduction and it freezes after printing "Time since incident:". Oh well. :(

 

I agree with abarbarian about using bittorrent, it is a marvellous technology and very community spirited as every downloader helps share the file thus reducing the load on the main server. This is especially important for smaller distros with less server resources.

I don't understand how anyone could not like (legally) using bittorrent.

Link to comment
Share on other sites

securitybreach

That is probably because siduction does not use systemd and does not use pacman. It could probably easily adapted for debian.

Link to comment
Share on other sites

abarbarian

Hi Josh I got what the script did. I just could not see me ever using it in the foreseeable future. If I had a crash, I'd cry ,panic, have a cup of tea, then restore from backup. victory.png

 

As to speed, I ain't that interested. However if every Arch user used torrents to get an .iso and left their torrent client running when they were on line then I recon with the size of the swarm seeding then torrents would be as fast as wget, or fast enough for most folk.

Torrents are about freedom and community spirit as sunrat points out "and very community spirited as every downloader helps share the file thus reducing the load on the main server." If folks get into the habit of helping out for their pc needs who knows where it would end ! electric_shock.png

  • Like 1
Link to comment
Share on other sites

securitybreach

Torrents are about freedom and community spirit as sunrat points out "and very community spirited as every downloader helps share the file thus reducing the load on the main server." If folks get into the habit of helping out for their pc needs who knows where it would end ! electric_shock.png

 

Yeah, I realize this as I have been torrenting for over a decade (warez before that) :pirate:

Link to comment
Share on other sites

securitybreach
Hi Josh I got what the script did. I just could not see me ever using it in the foreseeable future. If I had a crash, I'd cry ,panic, have a cup of tea, then restore from backup. victory.png

 

Well that does not fix the issue nor does it resolve as to why it happened in the first place. Restoring from a backup does not help if you end up with the same problem again. It is better to find out why something happened versus just restoring a backup.

Link to comment
Share on other sites

abarbarian

Yeah, I realize this as I have been torrenting for over a decade (warez before that) :pirate:

 

I know that.

 

I keep on banging on about legal uses for torrents as I am like sunrat in that " I don't understand how anyone could not like (legally) using bittorrent."

An I recon if I keep on banging me drum about it one day it may become reality an that would really get up the mans nose bad_smile.png

  • Like 2
Link to comment
Share on other sites

abarbarian

[/size]

 

Well that does not fix the issue nor does it resolve as to why it happened in the first place. Restoring from a backup does not help if you end up with the same problem again. It is better to find out why something happened versus just restoring a backup.

 

Hey you got to go with what works. I'm two years into studying Arch and I still have not solved all me set up problems.So the chance of me fixing 'owt is slim. I work on the principle that if I wait long enough someone will fix whatever an I can carry on. Anyways if it don't get fixed I can always choose one of the millions of other distros till a fix comes along. happy.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...