Bash script variables question[Scanned]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi guys,

I'm putting together a simple login script for bash where I call a zenity box that has an IT Policy for our company.

If the user accepts the policy I want this acceptance to be echoed, along with the host name of the machine they are on and the time, into a text file on a mounted network share. The script I have so far is:

#!/bin/sh

ctime=/bin/date
compname=hostname

if zenity --question --title "Cambridge Newspapers IT Policy" --text "By logging intothis workstation you accept that you are bound to the IT Policy. \n\nIf you do not accept this policy please selcet Cancel to logoff, otherwise press OK to continue."

then
    echo $USER "accepted User IT Policy @" $ctime "from" $compname
else
    echo "Logoff"
    # remove the echo and speach marks
    echo 'killall gnome-session'
fi

But the date is not echoed, only the string 'date' and 'hostname' does the same. Can anyone tell me where I am going wrong?

Thanks in advance,

-Chris


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux