[clue] seeking debugging advice
foo7775 at comcast.net
foo7775 at comcast.net
Sun Mar 8 21:41:28 MDT 2015
Huh. Great tip, thanks David!
----- Original Message -----
From: "David L. Willson" <DLWillson at TheGeek.NU>
To: "CLUE's mailing list" <clue at cluedenver.org>
Sent: Sunday, March 8, 2015 8:14:03 AM
Subject: Re: [clue] seeking debugging advice
Jeff Haemer taught me to start all my scripts with this:
#!/bin/bash -eu
Or this:
#!/bin/bash -eux
e means exit on any unhandled error
u means exit on the use of any unset variable
x means to echo every statement as it's processed
I use eu always, and x when I'm having problems.
Sent from my Verizon Wireless 4G LTE smartphone
-------- Original message --------
From: Mike Bean <beandaemon at gmail.com>
Date: 03/06/2015 1:54 PM (GMT-07:00)
To: CLUE's mailing list <clue at cluedenver.org>
Subject: [clue] seeking debugging advice
OK - I've been staring at this for a while, I'm just not seeing it. Anyone have any suggestions as to why
#setupScript.sh
#assumes RHEL 64 bit
#install RPMs
yum -y groupinstall "Desktop" "Desktop Platform" "X Window System" "Fonts" "Graphical Administration Tools" "Internet Browser" "General Purpose Desktop" "Graphics Creation Tools" "Legacy X Window System compatibility"
#set default boot to rl5
sed -i 's/id:3:initdefault:/id:5:initdefault:/g' /etc/inittab
echo "inserting a test line"
/bin/rpm -ivh /root/packages/epel-release-6-8.noarch.rpm
/bin/rpm -i /root/packages/fahcontrol-7.4.4-1.noarch.rpm
/bin/rpm -i /root/packages/fahviewer-7.4.4-1.x86_64.rpm
/bin/rpm -i /root/packages/fahclient-7.4.4-1.x86_64.rpm
/bin/rpm -i /root/packages/nomachine_4.4.12_11_x86_64.rpm
#configures nomachine
cp /usr/NX/etc/server.cfg /usr/NX/etc/server.cfg.backup2
sed -i 's/EnablePasswordDB = "0"/EnablePasswordDB = "1"/g' /usr/NX/etc/server.cfg
service sshd restart
/usr/NX/bin/nxserver --restart
#adds myuser
useradd -m -d /home/mbean -s /bin/bash mbean
passwd mbean
/usr/NX/bin/nxserver --useradd mbean
#copies sshKeys
cp -pr /root/.ssh/authorized_keys /home/mbean/.ssh/authorized_keys
chown -r mbean /home/mbean/.ssh
chgrp -r mbean /home/mbean/.ssh
#deletes the default user
userdel ec2-user
rm -rf /home/ec2-user
Produces:
Package xorg-x11-fonts-Type1-7.2-9.1.el6.noarch already installed and latest version
Package xorg-x11-fonts-misc-7.2-9.1.el6.noarch already installed and latest version
Package xorg-x11-fonts-100dpi-7.2-9.1.el6.noarch already installed and latest version
Package xorg-x11-fonts-ISO8859-1-100dpi-7.2-9.1.el6.noarch already installed and latest version
Warning: Group legacy-x does not have any packages.
No packages in any requested group available to install or update
: No such file or directoryb
inserting a test line
failed: No such file or directory-release-6-8.noarch.rpm
failed: No such file or directoryontrol-7.4.4-1.noarch.rpm
failed: No such file or directoryiewer-7.4.4-1.x86_64.rpm
failed: No such file or directorylient-7.4.4-1.x86_64.rpm
failed: No such file or directorychine_4.4.12_11_x86_64.rpm
: No such file or directory/server.cfg
What'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's some funky text expansion or special character in userspace that I'm missing.
Here's the contents of /root/packages:
drwxr-xr-x. 3 root root 4096 Mar 6 15:46 .
dr-xr-x---. 6 root root 4096 Mar 6 15:18 ..
-rw-r--r--. 1 root root 1308 Mar 6 15:29 1
-rw-r--r--. 1 root root 14540 Mar 5 15:55 epel-release-6-8.noarch.rpm
-rw-r--r--. 1 root root 4594767 Mar 5 15:56 fahclient-7.4.4-1.x86_64.rpm
-rw-r--r--. 1 root root 234381 Mar 5 15:56 fahcontrol-7.4.4-1.noarch.rpm
-rw-r--r--. 1 root root 4932300 Mar 5 15:56 fahviewer-7.4.4-1.x86_64.rpm
drwx------. 2 root root 16384 Mar 6 13:54 lost+found
-rw-r--r--. 1 root root 32634161 Mar 3 14:02 nomachine_4.4.12_11_x86_64.rpm
-rwxr--r--. 1 root root 1230 Mar 6 15:46 setupScript.sh
-rwxr--r--. 1 root root 248 Mar 6 15:38 testscript.sh
[root at ip-172-31-43-35 packages]# pwd
/root/packages
advice is appreciated
Mike B
_______________________________________________
clue mailing list: clue at cluedenver.org
For information, account preferences, or to unsubscribe see:
http://cluedenver.org/mailman/listinfo/clue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cluedenver.org/pipermail/clue/attachments/20150309/f400b2ef/attachment.html
More information about the clue
mailing list