<div dir="ltr">Totally stealing David&#39;s advice.    Many thanks!<div><br></div><div>Mike B</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 8, 2015 at 8:14 AM, David L. Willson <span dir="ltr">&lt;<a href="mailto:DLWillson@thegeek.nu" target="_blank">DLWillson@thegeek.nu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Jeff Haemer taught me to start all my scripts with this:</div><div>#!/bin/bash -eu</div><div>Or this:</div><div>#!/bin/bash -eux</div><div><br></div><div>e means exit on any unhandled error</div><div><br></div><div>u means exit on the use of any unset variable</div><div><br></div><div>x means to echo every statement as it&#39;s processed</div><div><br></div><div>I use eu always, and x when I&#39;m having problems.</div><div><br></div><div><div style="font-size:9px;color:#575757">Sent from my Verizon Wireless 4G LTE smartphone</div></div><div><div class="h5"><div></div><br><br>-------- Original message --------<br>From: Mike Bean &lt;<a href="mailto:beandaemon@gmail.com" target="_blank">beandaemon@gmail.com</a>&gt; <br>Date: 03/06/2015  1:54 PM  (GMT-07:00) <br>To: CLUE&#39;s mailing list &lt;<a href="mailto:clue@cluedenver.org" target="_blank">clue@cluedenver.org</a>&gt; <br>Subject: [clue] seeking debugging advice <br><br><div dir="ltr">OK - I&#39;ve been staring at this for a while, I&#39;m just not seeing it.  Anyone have any suggestions as to why<div><br></div><div><div>#setupScript.sh</div><div>#assumes RHEL 64 bit</div><div>#install RPMs</div><div>yum -y groupinstall &quot;Desktop&quot; &quot;Desktop Platform&quot; &quot;X Window System&quot; &quot;Fonts&quot; &quot;Graphical Administration Tools&quot; &quot;Internet Browser&quot; &quot;General Purpose Desktop&quot; &quot;Graphics Creation Tools&quot; &quot;Legacy X Window System compatibility&quot;</div><div>#set default boot to rl5</div><div>sed -i &#39;s/id:3:initdefault:/id:5:initdefault:/g&#39; /etc/inittab</div><div>echo &quot;inserting a test line&quot;</div><div>/bin/rpm -ivh /root/packages/epel-release-6-8.noarch.rpm</div><div>/bin/rpm -i /root/packages/fahcontrol-7.4.4-1.noarch.rpm</div><div>/bin/rpm -i /root/packages/fahviewer-7.4.4-1.x86_64.rpm</div><div>/bin/rpm -i /root/packages/fahclient-7.4.4-1.x86_64.rpm</div><div>/bin/rpm -i /root/packages/nomachine_4.4.12_11_x86_64.rpm</div><div>#configures nomachine</div><div>cp /usr/NX/etc/server.cfg /usr/NX/etc/server.cfg.backup2</div><div>sed -i &#39;s/EnablePasswordDB = &quot;0&quot;/EnablePasswordDB = &quot;1&quot;/g&#39; /usr/NX/etc/server.cfg</div><div>service sshd restart</div><div>/usr/NX/bin/nxserver --restart</div><div>#adds myuser</div><div>useradd -m -d /home/mbean -s /bin/bash mbean</div><div>passwd mbean</div><div>/usr/NX/bin/nxserver --useradd mbean</div><div>#copies sshKeys</div><div>cp -pr /root/.ssh/authorized_keys /home/mbean/.ssh/authorized_keys</div><div>chown -r mbean /home/mbean/.ssh</div><div>chgrp -r mbean /home/mbean/.ssh</div><div>#deletes the default user</div><div>userdel ec2-user</div><div>rm -rf /home/ec2-user</div></div><div><br></div><div>Produces: </div><div><br></div><div><div>Package xorg-x11-fonts-Type1-7.2-9.1.el6.noarch already installed and latest version</div><div>Package xorg-x11-fonts-misc-7.2-9.1.el6.noarch already installed and latest version</div><div>Package xorg-x11-fonts-100dpi-7.2-9.1.el6.noarch already installed and latest version</div><div>Package xorg-x11-fonts-ISO8859-1-100dpi-7.2-9.1.el6.noarch already installed and latest version</div><div>Warning: Group legacy-x does not have any packages.</div><div>No packages in any requested group available to install or update</div><div>: No such file or directoryb</div><div>inserting a test line</div><div> failed: No such file or directory-release-6-8.noarch.rpm</div><div> failed: No such file or directoryontrol-7.4.4-1.noarch.rpm</div><div> failed: No such file or directoryiewer-7.4.4-1.x86_64.rpm</div><div> failed: No such file or directorylient-7.4.4-1.x86_64.rpm</div><div> failed: No such file or directorychine_4.4.12_11_x86_64.rpm</div><div>: No such file or directory/server.cfg</div></div><div><br></div><div>What&#39;s really confusing me is that I literally went through and executed the commands one at a time by hand without any errors.   Only thing I can think of is maybe there&#39;s some funky text expansion or special character in userspace that I&#39;m missing.</div><div><br></div><div>Here&#39;s the contents of /root/packages:</div><div><br></div><div><div>drwxr-xr-x. 3 root root     4096 Mar  6 15:46 .</div><div>dr-xr-x---. 6 root root     4096 Mar  6 15:18 ..</div><div>-rw-r--r--. 1 root root     1308 Mar  6 15:29 1</div><div>-rw-r--r--. 1 root root    14540 Mar  5 15:55 epel-release-6-8.noarch.rpm</div><div>-rw-r--r--. 1 root root  4594767 Mar  5 15:56 fahclient-7.4.4-1.x86_64.rpm</div><div>-rw-r--r--. 1 root root   234381 Mar  5 15:56 fahcontrol-7.4.4-1.noarch.rpm</div><div>-rw-r--r--. 1 root root  4932300 Mar  5 15:56 fahviewer-7.4.4-1.x86_64.rpm</div><div>drwx------. 2 root root    16384 Mar  6 13:54 lost+found</div><div>-rw-r--r--. 1 root root 32634161 Mar  3 14:02 nomachine_4.4.12_11_x86_64.rpm</div><div>-rwxr--r--. 1 root root     1230 Mar  6 15:46 setupScript.sh</div><div>-rwxr--r--. 1 root root      248 Mar  6 15:38 testscript.sh</div><div>[root@ip-172-31-43-35 packages]# pwd</div><div>/root/packages</div></div><div><br></div><div>advice is appreciated</div><div><br></div><div>Mike B</div></div>
</div></div></div><br>_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br></blockquote></div><br></div>