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

RE: [K12OSN] profile.d question



You guys might know this already, but you can log the output of your scripts by calling the script like this:  scriptname.here >> /home/user/scriptname.log 2>&1  This will give you a little more insight into what is going on.

I picked this up off of the following website about the cron command:  http://www.linuxhelp.net/guides/cron/

-Rob

 --- On Sat 12/04,  < dahopkins comcast net > wrote:
From:  [mailto: dahopkins comcast net]
To: k12osn redhat com, k12osn redhat com
     Cc: HBurroughs HHPREP ORG
Date: Sat, 04 Dec 2004 12:31:21 +0000
Subject: RE: [K12OSN] profile.d question

Henry,<br><br>I had set the script to be executable, logged out/in,  and it just doesn't seem to matter.  Starting  a bash shell and  checking SETPRINTERS shows that the variable isn't getting set.  All I can think of at this point is perhaps DISPLAY isn't being returned like the script wants?  In that case, perhaps the script is running, but not finding any matches?  I use LDAP for authentication (shouldn't make a difference, but ...) <br><br>I plan to go in to the school this weekend and will double check on it then.  <br><br>Thanks,<br>Dave ...<br><br><br>> Dave,<br>> <br>> I wrote the script you are using on the Wiki (Thanks Petre for getting that on <br>> there).  When run, the script should set an environmental variable called <br>> SETPRINTERS.  If you log into a client (with the script in /etc/profile.d/ at <br>> least), that variable should get set.  Just run "echo $SETPRINTER" and it should <br>> say that it is =true... If that isn't there, then for some reason you!
r profile.d <br>> scripts aren't running... hmm... did you make the script executable?  run "ls -l <br>> setprinter.sh" while in the /etc/profile.d/ directory and make sure you have the <br>> "x" bits set, otherwise the script will not run.  Run "chmod a+x setprinter.sh" <br>> in the profile.d directory again.  Try loging in again and see if the variable <br>> is set. =)<br>> <br>> Henry<br>> <br>> <br>> -----Original Message-----<br>> From:	dahopkins comcast net [mailto:dahopkins comcast net]<br>> Sent:	Fri 12/3/2004 2:00 PM<br>> To:	K12LTSP<br>> Cc:	<br>> Subject:	[K12OSN] profile.d question<br>> It is Friday, so I get to try and troubleshoot printer problems again.<br>> <br>> Speciifically, I am trying to get the script on the wiki.for setting the default <br>> printer to work.  I have created the profile.d entry, and the /etc/sysconfig <br>> entry.  But, no luck.  If I run lpoptions from a shell, it works fine.  So ... <br>> when do scripts in /etc/profile.d get executed!
 and does it depend on what shell <br>> the user has defined?!
   I have
 also tried the script that uses awk to set the <br>> PRINTER variable, but it likewise doesn't work for me.  I am sure the solution <br>> is simple, I just can't find it.  <br>> <br>> Sincerely,<br>> Dave Hopkins<br>> Newark Charter School<br>> <br>> <br>> <br>> <br>> <br>> <br>> _______________________________________________<br>> K12OSN mailing list<br>> K12OSN redhat com<br>> https://www.redhat.com/mailman/listinfo/k12osn<br>For more info see <http://www.k12os.org><br><br>
> --- Begin Attached Message---
--NextPart_Webmail_9m3u9jl4l_19274_1102163481_1<br>Content-Type: application/ms-tnef;<br>	name="winmail.dat"<br>Content-Transfer-Encoding: base64<br><br>eJ8+IjQXAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy<br>b3NvZnQgTWFpbC5Ob3RlADEIAQ2ABAACAAAAAgACAAEEgAEAIAAAAFJFOiBbSzEyT1NOXSBwcm9m<br>aWxlLmQgcXVlc3Rpb24AggoBBYADAA4AAADUBwwAAwASACcAMwAFAFsBASCAAwAOAAAA1AcMAAMA<br>EgAnADMABQBbAQEJgAEAIQAAAEExOEQwRTAzNUExODZBNDFCNzFENzA4NTM3ODMyMTBGAPEGAQOQ<br>BgBwCwAAOQAAAAMAJgAAAAAAAwA2AAAAAABAADkAfJA/YpHZxAEeAD0AAQAAAAUAAABSRTogAAAA<br>AAIBRwABAAAALwAAAGM9dXM7YT0gO3A9SEhQcmVwO2w9SEhQTUFJTC0wNDEyMDMyMzM5NTFaLTQ1<br>MTQAAB4ASQABAAAAHAAAAFtLMTJPU05dIHByb2ZpbGUuZCBxdWVzdGlvbgBAAE4AAO5rWmrZxAEe<br>AFoAAQAAABYAAABkYWhvcGtpbnNAY29tY2FzdC5uZXQAAAACAVsAAQAAAEkAAAAAAAAAgSsfpL6j<br>EBmdbg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A!
AAAeADBAAQAAAAsAAABIQlVSUk9VR0hTAAAeADFAAQAA<br>AAsAAABIQlVSU!
 k9VR0hTA
AA
 eADJAAQAAABYAAABkYWhvcGtpbnNAY29tY2FzdC5uZXQAAAAeADNA<br>AQAAABYAAABkYWhvcGtpbnNAY29tY2FzdC5uZXQAAAAeADhAAQAAAAsAAABIQlVSUk9VR0hTAAAe<br>ADlAAQAAAAIAAAAuAAAACwApAAAAAAALACMAAAAAAAMABhA6thMcAwAHEMAEAAADABAQAAAAAAMA<br>ERAAAAAAHgAIEAEAAABlAAAAREFWRSxJV1JPVEVUSEVTQ1JJUFRZT1VBUkVVU0lOR09OVEhFV0lL<br>SShUSEFOS1NQRVRSRUZPUkdFVFRJTkdUSEFUT05USEVSRSlXSEVOUlVOLFRIRVNDUklQVFNIT1VM<br>RFNFVAAAAAACAX8AAQAAAD0AAAA8MEVGQTJDNjg2ODlBMDU0Q0EyREU4NEI4QTJENzg0MjAwNzNG<br>NkZAaGhwbWFpbC5NRURJQS5MT0NBTD4AAAAApv4=<br><br>--NextPart_Webmail_9m3u9jl4l_19274_1102163481_1--<br><br>
> --- End Attached Message---
_______________________________________________<br>K12OSN mailing list<br>K12OSN redhat com<br>https://www.redhat.com/mailman/listinfo/k12osn<br>For more info see <http://www.k12os.org>

_______________________________________________
No banners. No pop-ups. No kidding.
Make My Way your home on the Web - http://www.myway.com


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