[INFO & SCRIPT] Slackware Mirror Settings for USM

Post tutorials, HOWTO's and other useful resources here.
Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#61 by Bogomips » 10 Jul 2017, 15:53

No windoze file close to hand:

Code: Select all

guest@porteus:~$ wc -l crm.sh
18 crm.sh

guest@porteus:~$ od -cx crm.sh | grep -B1 0a
0000000   #   !   /   b   i   n   /   b   a   s   h  \n   #       c   r
           2123    622f    6e69    622f    7361    0a68    2023    7263
--
0000100   p   s  \n   #       L   a   s   t       U   p   d   a   t   e
           7370    230a    4c20    7361    2074    7055    6164    6574
--
0000200   s   i   t   o   r   y  \n   c   r   m       (   )  \n   {  \n
           6973    6f74    7972    630a    6d72    2820    0a29    0a7b
--
0000240   h   e   n      \n   e   c   h   o       -   e       "   A   r
           6568    206e    650a    6863    206f    652d    2220    7241
--
0000300   t   <   R   e   p   o   s   i   t   o   r   y   >   "   ;  \n
           3c74    6552    6f70    6973    6f74    7972    223e    0a3b
0000320   r   e   t   u   r   n       0   ;  \n   f   i  \n   #       C
           6572    7574    6e72    3020    0a3b    6966    230a    4320
--
0000360   o   r   y  \n   e   v   a   l       $   (   g   r   e   p
           726f    0a79    7665    6c61    2420    6728    6572    2070
--
0000500   c   o   n   f  \n   [   [       $   D   I   S   T   R   O   S
           6f63    666e    5b0a    205b    4424    5349    5254    534f
--
0000600   e   t   u   r   n       1   ;       }  \n   D   I   S   T   R
           7465    7275    206e    3b31    7d20    440a    5349    5254
--
0000720  \n   [   [       $   D   I   S   T   R   O   S       =   ~
           5b0a    205b    4424    5349    5254    534f    3d20    207e
--
0001060   u   r   n       2   ;       }  \n   d   =   $   1   ;       e
           7275    206e    3b32    7d20    640a    243d    3b31    6520
--
0001360   C   o   m   m   e   n   t   e   d       O   u   t   ;  \n   }
           6f43    6d6d    6e65    6574    2064    754f    3b74    7d0a
0001400  \n   c   r   m       $   *  \n  \n
           630a    6d72    2420    0a2a    000a
So in your case you would use:

Code: Select all

od  -cx  crm.sh | grep -B1 0d
to get a clear picture. 8)
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 3317
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#62 by Ed_P » 10 Jul 2017, 22:20

Bogomips wrote:So in your case you would use:

Code: Select all

od  -cx  crm.sh | grep -B1 0d
to get a clear picture. 8)
Nope, definitely not seeing it.

Code: Select all

guest@porteus:~$ od  -cx  /mnt/sda6/porteus3.2/usbporteuskernelupdt.cmd | grep -B1 0d
0000000   @   e   c   h   o           o   f   f  \r  \n  \r  \n   x   c
           6540    6863    206f    6f20    6666    0a0d    0a0d    6378
--
0000100   y   s   l   i   n   u   x   \  \r  \n   x   c   o   p   y    
           7379    696c    756e    5c78    0a0d    6378    706f    2079
--
0000160   .   x   z   m       \   M   o   d   u   l   e   s  \r  \n   :
           782e    6d7a    5c20    6f4d    7564    656c    0d73    3a0a
0000200   :       p   l   u   s  \r  \n   x   c   o   p   y       d   :
           203a    6c70    7375    0a0d    6378    706f    2079    3a64
--
0000260               \   M   o   d   u   l   e   s  \r  \n   x   c   o
           2020    5c20    6f4d    7564    656c    0d73    780a    6f63
--
0000360  \r  \n   :   :       p   l   u   s  \r  \n   x   c   o   p   y
           0a0d    3a3a    7020    756c    0d73    780a    6f63    7970
--
0000440                           \   M   o   d   u   l   e   s  \r  \n
           2020    2020    2020    4d5c    646f    6c75    7365    0a0d
--
0000540   l   e   s  \r  \n   x   c   o   p   y       d   :   \   p   o
           656c    0d73    780a    6f63    7970    6420    5c3a    6f70
--
0000620   \   O   p   t   i   o   n   a   l  \r  \n   :   :       p   l
           4f5c    7470    6f69    616e    0d6c    3a0a    203a    6c70
0000640   u   s  \r  \n   x   c   o   p   y       d   :   \   p   o   r
           7375    0a0d    6378    706f    2079    3a64    705c    726f
--
0000720   O   p   t   i   o   n   a   l  \r  \n  \r  \n   S   E   T   L
           704f    6974    6e6f    6c61    0a0d    0a0d    4553    4c54
--
0001000   Y   E   D   E   X   P   A   N   S   I   O   N  \r  \n   e   c
           4559    4544    5058    4e41    4953    4e4f    0a0d    6365
--
0001040       \   M   o   d   u   l   e   s   \   "  \r  \n   F   O   R
           5c20    6f4d    7564    656c    5c73    0d22    460a    524f
--
0001160       D   O       (      \r  \n   e   c   h   o       %   %   a
           4420    204f    2028    0a0d    6365    6f68    2520    6125
0001200       )  \r  \n   e   c   h   o   .  \r  \n   e   c   h   o    
           2920    0a0d    6365    6f68    0d2e    650a    6863    206f
--
0001260   l   e   s   \   "  \r  \n   F   O   R       /   F       "   t
           656c    5c73    0d22    460a    524f    2f20    2046    7422
--
0001400   x   z   m   "   "   '   )       D   O       (      \r  \n   e
           7a78    226d    2722    2029    4f44    2820    0d20    650a
0001420   c   h   o       %   %   a       )  \r  \n   p   a   u   s   e
           6863    206f    2525    2061    0d29    700a    7561    6573
0001440       >       n   u   l  \r  \n  \r  \n
           3e20    6e20    6c75    0a0d    0a0d
guest@porteus:~$ 
And there is a cr/lf at the end of each of the cmd file's 23 lines.
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#63 by Bogomips » 12 Jul 2017, 21:37

^
  • Text with Newlines

    Code: Select all

    guest@porteus:~$ hexdump -c crm.sh | grep '\\n'
    0000000   #   !   /   b   i   n   /   b   a   s   h  \n   #       c   r
    0000040   p   s  \n   #       L   a   s   t       U   p   d   a   t   e
    0000080   s   i   t   o   r   y  \n   c   r   m       (   )  \n   {  \n
    00000a0   h   e   n      \n   e   c   h   o       -   e       "   A   r
    00000c0   t   <   R   e   p   o   s   i   t   o   r   y   >   "   ;  \n
    00000d0   r   e   t   u   r   n       0   ;  \n   f   i  \n   #       C
    00000f0   o   r   y  \n   e   v   a   l       $   (   g   r   e   p
    0000140   c   o   n   f  \n   [   [       $   D   I   S   T   R   O   S
    0000180   e   t   u   r   n       1   ;       }  \n   D   I   S   T   R
    00001d0  \n   [   [       $   D   I   S   T   R   O   S       =   ~
    0000230   u   r   n       2   ;       }  \n   d   =   $   1   ;       e
    00002f0   C   o   m   m   e   n   t   e   d       O   u   t   ;  \n   }
    0000300  \n   c   r   m       $   *  \n  \n
    guest@porteus:~$ od -c crm.sh | grep '\\n'
    0000000   #   !   /   b   i   n   /   b   a   s   h  \n   #       c   r
    0000100   p   s  \n   #       L   a   s   t       U   p   d   a   t   e
    0000200   s   i   t   o   r   y  \n   c   r   m       (   )  \n   {  \n
    0000240   h   e   n      \n   e   c   h   o       -   e       "   A   r
    0000300   t   <   R   e   p   o   s   i   t   o   r   y   >   "   ;  \n
    0000320   r   e   t   u   r   n       0   ;  \n   f   i  \n   #       C
    0000360   o   r   y  \n   e   v   a   l       $   (   g   r   e   p
    0000500   c   o   n   f  \n   [   [       $   D   I   S   T   R   O   S
    0000600   e   t   u   r   n       1   ;       }  \n   D   I   S   T   R
    0000720  \n   [   [       $   D   I   S   T   R   O   S       =   ~
    0001060   u   r   n       2   ;       }  \n   d   =   $   1   ;       e
    0001360   C   o   m   m   e   n   t   e   d       O   u   t   ;  \n   }
    0001400  \n   c   r   m       $   *  \n  \n
    
  • Possible test

    Code: Select all

    guest@porteus:~$ wc -l crm.sh 
    18 crm.sh
    guest@porteus:~$ od -c crm.sh | grep -c  '\\n'
    13
    
    guest@porteus:~$ (($(od -c crm.sh | grep -c '\\r'))) || echo Clear for Unix 
    Clear for Unix
    
Ed_P wrote:guest@porteus:~$ bash safm.sh slacky

Current Mirror: http://slack.isper.sk/pub
Alternative Mirrors
Choices Exhausted! Terminating.
guest@porteus:~$
[/code]
This did not add up before, but should add up now. ;)

Code: Select all

/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4COUDURdABGIQkY99Bhqpmevep/hkeUyGDB63KA6oNDB
Wn9HcwFVj2vWfvFK/sgEOgThVrKHq9R4QiyTJ/GTMnKzDs3BszbsMeuB6fJTciaLRz7pivepe8Qw
sb77S+5UCDPv8tCUex1Z2WkCXIIXhsnsRJr0eaTA1+lxy6pLQBvqE3O8dELWvzYa6WsDUK4akBry
gtgrAJXaeltOT5PBXLpwUZR/s/JjpAVrkNqTW7/nRECazG9WkCh0E8HiSDrpBsfnuXj8qHJ0k8+P
riU5fbvbjjnvHxQB8GjKic3k1Z/FSAr5RUMJLOE6cchJRgvwOgHu2fCT3jroTxb/Yf7LJt0kePwB
gdRSaHkXyMZIklDsh2L/0pFPjO90/QWfwaJmrug83N4wxJgFZADg/CWCoWACWdI1+sh/F9SvhPEp
cxLeh+ee95/xu0qaLMu54gfeCpliTr49+7uUKkybLzavk1q2Im3hvavdy7hFYBBnjt+ERYAdJZt8
ad2NtKf3tmKEOmFyUcXFpmHRbpTa/Pp3cs2DGoACQELaPBTqVKvIoBya9ub3QNTd9mwFyF92Pmxw
L2PpKvt3c/zqa/gpoXMSKYRrsOtIj6+ywGzOQFREwOnvqrTWlnPGyq6gaBU/+mmcxDI6Z5etj5V8
b1zQS7l0r8g2JG8IGaNjKxAroBCZRv8eJ7VUXPhRZezr5jvunaSYA0rCpR+D0TVB6NU8B2lYVw5F
kNa5bcQsRY0QFfGd822nVC9pNNFwnPFrWMXvx5bTy0z0dUZzHg/Zs9Jji8HD3xmKU7yKwYeL4CbC
HF4VLlEg6Hq0hbzIHkq7OpdJqcr0ibtrDWO1yHVLP+pnUf/mcaBtbZEjrtCdmmkOBHxPWcD4dgsj
hB2lkoNxZ8fimy805ZgGflDwcA6bWwNJQ9f1LW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Qhiij3bGRVz4IUAn8qfjLE5nUxMFrDZ
1rGk4RVHvgwXPKvKCmLRrEHSwf4jNIb8yRUXj9EW18WEhmc02zKxQ3/3869ijGzwXSrSlI5qvIdM
SqiTNgttgxS3pwYwaYTT28yauk+AVkFikv//07pHojctoGYNXAUYoGiDZ1QXkOX9FIe8zZVWPPIL
9P9GhALRRJQ+C+tZSgqja/5ZPijt43gO5r8kJ6MkkRPcLdrC4mQR1+0k+9v6Vyr+kP4E+u81Izq+
mXKgTZdjCq/EfnECEc8ObrZFGk5PK+wiCflLyYhlJP1pPv/sNGwULRc4qx/gDmijHKhGg11pnU8N
nhpnAPJUTrABSF1MptKqDyWLgDymMokoMiWc2bjmI9dqfWIUSVYvHZje3cURTulZHKC7WCxnQbKi
Jn06T1uyAADEzUR48z/VUgAB4BqVRwAAr8oKALHEZ/sCAAAAAARZWg==

Code: Select all

guest@porteus:~$ base64 -d > safm.xz
/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4COUDURdABGIQkY99Bhqpmevep/hkeUyGDB63KA6oNDB
...
Jn06T1uyAADEzUR48z/VUgAB4BqVRwAAr8oKALHEZ/sCAAAAAARZWg==
^D
guest@porteus:~$ md5sum safm.xz
0273ef6e31bca9b3602a62ba132a7b31  safm.xz

sh-4.4$ xz -d < safm.xz > safm.sh
sh-4.4$ md5sum safm.sh
26efa827b30750b1d7abc79367289d14  safm.sh
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 3317
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#64 by Ed_P » 13 Jul 2017, 00:22

^ Enough with the hex dump stuff. It's not showing me problems, it's not showing me line numbers and it's not showing me source code I can relate to.

If you have made a change to safm.sh please post the source.
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#65 by Bogomips » 13 Jul 2017, 01:08

Ed_P wrote:^ Enough with the hex dump stuff. It's not showing me problems, it's not showing me line numbers and it's not showing me source code I can relate to.
Thought there was a problem with having Carriage Returns in files meant for linux. Looking for carriage return '\r' would show if there was a problem, and the surrounding test would be sufficient to show where that was. However In the first instance would be just to see if a text file was a problem file.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 3317
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#66 by Ed_P » 13 Jul 2017, 03:23

Bogomips wrote:Thought there was a problem with having Carriage Returns in files meant for linux.
And I thought this was the solution.
Bogomips wrote:So, get rid of all that windoze impurity firstly, before entering pristine environment of unix: :twisted:

Code: Select all

tr -d '\15\32' < USM/safm.sh | sed "s/\s*kpv\s*().*/masm \$*/;T;q" > masm.sh
also have to do same with safm.sh:

Code: Select all

cd USM; cp safm.sh safm.wdz
tr -d '\15\32' < safm.wdz > safm.sh
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

Re: [INFO & SCRIPT] Slackware Mirror Settings for USM

Post#67 by Bogomips » 13 Jul 2017, 21:04

Ed_P wrote:And I thought this was the solution.
Depends on what solution is being sought. Seem to be at cross purposes here. Thought there was a requirement to put something into your script to detect files with windoze line ends, so that then this could help find out how it happened. Then of course the solution mentioned above would be applied. Made illustration of this in finding '\n', so that could see would work in same way to find '\r'. Made also as documentation for future reference.
Ed_P wrote:If you have made a change to safm.sh please post the source.
Due to issue of redundant characters in source file copied from post, for testing purposes it's best to be on ths same page using the same file. There are two ways of going about this, the first of which is to put file in cloud. But why clutter up cloud with such a small file? Apart from this file needs to be compressed, md5sum made, then login required following which Javascript needs to be turned on for upload to cloud.

Do not as a rule run with javascript enabled, as the moment it's on some other tab could start a script. It has happened after enabling javascript globally, doing something in a tab, closing same and minmising browser that some five minutes later system grinds to halt. Some unexpected script gone ballistic, cpu load at 100%, hdd light a steady red glow. Nothing for it but to open a console, kill browser, wait for disk light to go out, return to GUI, wait for browser window to close, then restart browser. Just last night left a tab with Javascript enabled, remembered, returned to tab to disable javascript, but already too late, script ballistic. :twisted:

Really don't need to risk all this extra hassle when there are perfectly good system utilities available which will do the job. Just have to do a little extra work after compressing the script: getting md5sums of .sh an .xz files, encode the binary, copy the output and paste into code block of post, then copy this code block and paste as input for decoding to binary, get md5sum and check with that of source binary, and finally decompressing and comparing check sums, which were then posted.

So, to get back exactly the same text file, is just a three step operation, taking five minutes at most. If this is too much, then I shall post the source file when satisfied it is working correctly in all aspects of operation.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 3317
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

USM bug reports

Post#68 by Ed_P » 26 Jul 2017, 14:09

Bogomips wrote:
26 Jul 2017, 12:19
script to check a repository's mirror (aka crm.sh)
:shock: There's another one!! :wall:
Ed

Bogomips
Full of knowledge
Full of knowledge
Posts: 2563
Joined: 25 Jun 2014, 15:21
Distribution: 3.2.2 Cinnamon & KDE5
Location: London

[INFO & SCRIPT] Slackware Mirror Settings for USM

Post#69 by Bogomips » 26 Jul 2017, 15:20

^ Is in the Contents of Post 2 at the end of Post 1. The script must have been given another name by you. But honestly these are collections of a few CLI statements which could have strung together off the top of my head at the time, but which can now only remember by acronym. Which is why important while Blaze in the midst of things to try out moving a topic. ;)

Now clearly see what is annoying, which is that the moved topic does not change its subject from original. Maybe Blaze can tweak this. :unknown:
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB

User avatar
Ed_P
Contributor
Contributor
Posts: 3317
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

[INFO & SCRIPT] Slackware Mirror Settings for USM

Post#70 by Ed_P » 26 Jul 2017, 15:58

Bogomips wrote:
26 Jul 2017, 15:20
Now clearly see what is annoying, which is that the moved topic does not change its subject from original. Maybe Blaze can tweak this. :unknown:
Never has ttbomk. SOP.
Ed

Post Reply