[clue] seeking debugging advice

Dan Kulinski daniel at kulinski.net
Fri Mar 6 13:57:13 MST 2015


Wouldn't you want sed -ie instead of just -i?

On Fri, Mar 6, 2015 at 1:54 PM, Mike Bean <beandaemon at gmail.com> wrote:

> 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/20150306/d999c787/attachment.html 


More information about the clue mailing list