Re: NFS file modes consistency among different operating systems

2013-09-16 Thread Mehmet Erol Sanliturk
On Tue, Sep 17, 2013 at 1:28 AM, aurfalien  wrote:

> >
> > When a file is modified by a user ,
>
> Whats that users umask?
>
> - aurf
>


755

Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: NFS file modes consistency among different operating systems

2013-09-16 Thread aurfalien
> When a file is modified by a user

Also curious whats that users group?

- aurf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: NFS file modes consistency among different operating systems

2013-09-16 Thread aurfalien
> 
> When a file is modified by a user ,

Whats that users umask?

- aurf
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: NFS file modes consistency among different operating systems

2013-09-16 Thread Mehmet Erol Sanliturk
On Mon, Sep 16, 2013 at 11:53 PM, aurfalien  wrote:

> From your non MS$ clients, open a shell and type umask, what returns?
>
> Sounds like your default umask needs changing is all.
>
> I would suggest going with a umask of 775 and ensuring all ppl requiring
> mod access be group members of what you have settled on.
>
>
>
> - aurf
>
> On Sep 16, 2013, at 8:41 PM, Mehmet Erol Sanliturk wrote:
>
> > Dear All ,
> >
> >
> > I have NFS 3 in FreeBSD 9.1 amd64 .
> >
> > The clients are FreeBSD , Linux , Windows XP through Samba on the same
> > files .
> >
> > The Windows XP is able to access , use and modify files created or
> modified
> > by any other operating system user .
> >
> > In contrary , FreeBSD and Linux users are NOT able to such sharing
> because
> > files are created by another user and access mode settings are not
> > changeable due to owner of files .
> >
> > It is very likely that some settings are missing but I do not know which
> > ones .
> >
> > One remedy is to use NFS server in root logged state and change file
> modes
> > frequently  ( An ordinary user in server is NOT permitted to change modes
> > of files created by other users although exported directories owned by
> such
> > a user ) .
> >
> > How can I solve the following problem :
> >
> > No any client should be able to change file modes set in server
> > All files created by client should inherit modes set in server directory
> .
> >
> >
>


Linux umask : 0002
FreeBSD umask : 0022


Changing client umask to 775 is not solving the problem , because in NFS
server , they are setting their own modes without considering existing
umask .

When a file is modified by a user , the other users in FreeBSD and Linux
are not able to access to these files even their umask values are 775 .

The Linux user is defined in groups 1000 and 1001 but this is also not
permitting access to files modified by other users whether their group is
1000 or 1001 .





> > Thank you very much .
> >
> > Mehmet Erol Sanliturk
> >
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: test if script called by cron

2013-09-16 Thread aurfalien
An easy way to do this is check /var/log/cron

There are many other ways. 

- aurf

On Sep 16, 2013, at 4:26 AM, Paul Macdonald wrote:

> 
> Hi,
> 
> Is there a simple way of testing whether a given script was called via cron,
> 
> I'd rather find a solution that would work from within the script rather than 
> setting an environment variable in the crontab.
> 
> thanks
> Paul.
> 
> (anyone here going to EuroBSD con?)
> 
> -- 
> -
> Paul Macdonald
> IFDNRG Ltd
> Web and video hosting
> -
> t: 0131 5548070
> m: 07970339546
> e: p...@ifdnrg.com
> w: http://www.ifdnrg.com
> -
> IFDNRG
> 40 Maritime Street
> Edinburgh
> EH6 6SA
> 
> High Specification Dedicated Servers from £100.00pm
> 
> 
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: NFS file modes consistency among different operating systems

2013-09-16 Thread aurfalien
>From your non MS$ clients, open a shell and type umask, what returns?

Sounds like your default umask needs changing is all.

I would suggest going with a umask of 775 and ensuring all ppl requiring mod 
access be group members of what you have settled on.



- aurf

On Sep 16, 2013, at 8:41 PM, Mehmet Erol Sanliturk wrote:

> Dear All ,
> 
> 
> I have NFS 3 in FreeBSD 9.1 amd64 .
> 
> The clients are FreeBSD , Linux , Windows XP through Samba on the same
> files .
> 
> The Windows XP is able to access , use and modify files created or modified
> by any other operating system user .
> 
> In contrary , FreeBSD and Linux users are NOT able to such sharing because
> files are created by another user and access mode settings are not
> changeable due to owner of files .
> 
> It is very likely that some settings are missing but I do not know which
> ones .
> 
> One remedy is to use NFS server in root logged state and change file modes
> frequently  ( An ordinary user in server is NOT permitted to change modes
> of files created by other users although exported directories owned by such
> a user ) .
> 
> How can I solve the following problem :
> 
> No any client should be able to change file modes set in server
> All files created by client should inherit modes set in server directory .
> 
> 
> Thank you very much .
> 
> Mehmet Erol Sanliturk
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


NFS file modes consistency among different operating systems

2013-09-16 Thread Mehmet Erol Sanliturk
Dear All ,


 I have NFS 3 in FreeBSD 9.1 amd64 .

The clients are FreeBSD , Linux , Windows XP through Samba on the same
files .

The Windows XP is able to access , use and modify files created or modified
by any other operating system user .

In contrary , FreeBSD and Linux users are NOT able to such sharing because
files are created by another user and access mode settings are not
changeable due to owner of files .

It is very likely that some settings are missing but I do not know which
ones .

One remedy is to use NFS server in root logged state and change file modes
frequently  ( An ordinary user in server is NOT permitted to change modes
of files created by other users although exported directories owned by such
a user ) .

How can I solve the following problem :

No any client should be able to change file modes set in server
All files created by client should inherit modes set in server directory .


Thank you very much .

Mehmet Erol Sanliturk
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: test if script called by cron

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 23:28:17 -0400, kpn...@pobox.com wrote:
> On Mon, Sep 16, 2013 at 02:05:04PM +0200, Polytropon wrote:
> > On Mon, 16 Sep 2013 12:26:59 +0100, Paul Macdonald wrote:
> > > Is there a simple way of testing whether a given script was called via 
> > > cron,
> > > 
> > > I'd rather find a solution that would work from within the script rather 
> > > than setting an environment variable in the crontab.
> > 
> > I'd suggest the script creates a file (lock file or,
> > much easier, just a simple normal file) at its beginning:
> > 
> > #!/bin/sh
> > /usr/bin/touch /tmp/scriptrun
> > # ... your script content here ...
> 
> Wouldn't the lockf command be better than touch? That way you get the
> condition code telling you whether or not the script is already running.

Yes, it would probably be better in this case. This, in
combination with the suggestion of "test-t 0" to check
if the script has been interactively called or not, looks
like a better solution.

However, the intial question does not make fully sure (at
least to me as a non-native speaker) if the intention is
(a) to check _if_ the script has been run via cron, or
(b) to check if the script has been run via _cron_. :-)



> > Of course you would have to manually remove that file
> > after you have verified its existence and content.
> 
> If you use lockf as a drop-in replacement for touch then, yes, you'll
> need to keep the lock file until removing it at the end of the script.

Depends. Let's say the script is scheduled at 3:00 and will
finish in about half an hour. The "evidence file" will only
be visible from 3:00 to ca. 3:30, so removing the "evidence
file" after the script has finished could lead to a false-negative
result ("has not been run"). This is also true for the more
simple solution using the touch command (no rm call at the
end of the script).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Updating texlive-base with portupgrade fails (sort of)

2013-09-16 Thread Bryan Drewery
On 8/25/2013 2:39 PM, Carmel wrote:
> Using "portupgrade-devel-20130718,3" installed from the ports system,
> attempting to update "texlive-base" always ends like this:
> 
> --->  Build of print/texlive-base ended at: Sun, 25 Aug 2013 15:25:25 -0400 
> (consumed 00:11:57)
> --->  Updating dependency info
> --->  Modifying /var/db/pkg/texlive-full-20120701/+CONTENTS
> --->  Upgrade of print/texlive-base ended at: Sun, 25 Aug 2013 15:25:28 -0400 
> (consumed 00:12:00)
> --->  Session ended at: Sun, 25 Aug 2013 15:25:28 -0400 (consumed 00:12:19)
> /usr/local/lib/ruby/site_ruby/1.9/pkgtools/pkgtools.rb:828: stack level too 
> deep (SystemStackError)
> 
> I have attempted to reboot the system and then start the update
> process; however it doesn't make any difference. Even though it appears
> as if the port has been updated, when I run "pkgdb -aFv", I am greeted
> with this:
> 
> [...]
> Checking texlive-base-20120701_7
> Checking texlive-full-20120701
> Stale dependency: texlive-full-20120701 -> texlive-base-20120701_8 
> (print/texlive-base):
> Disclose depends for texlive-full-20120701
> --->  Modifying /var/db/pkg/texlive-full-20120701/+CONTENTS
> Fixed. (-> texlive-base-20120701_7)
> [...]
> 
> This is the only package that "portupgrade" seems to be chocking on. I
> used "portupgrade" to initially install the complete "texlive" package,
> so I am not sure why it is suddenly have problems.
> 

I've just updated ports-mgmt/portupgrade-devel with a fix. Please give
it a try and let me know. Version 20130916,3.


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


Re: Migration TeX/LaTeX: from teTeX --> TeXlive

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 20:33:15 +0200, Roland Smith wrote:
> On Mon, Sep 16, 2013 at 01:57:51AM +0200, Polytropon wrote:
> > On Sun, 15 Sep 2013 21:00:22 +0200, Roland Smith wrote:
> > > Personally I don't think TeX is a good fit for the ports tree (because of
> > > duplication of effort).
> 
> I have to add that I think that the chosen strategy (provide a full port and a
> minimal port) is a good balance between functionality and maintenance 
> workload.

This is a good approach for all cases where no custom
configuration (being done by tlmgr) has been done, and
it should work for most scenarios, I assume.



> > In conclusion, that could be said about many other software
> > that brings its own package management.
> 
> More or less. Not all of those work equally well as tlmgr or the ports tree.

Of course; think about pip, npm, and the like.

The preferred goal of using tlmgr from the TeXLive distribution
instead of installing it with the ports tree (or pkg) would be
that it somehow at least records the existence of the TeXLive
installation on the system. This causes ports depending on it
_not_ to attempt any futile additional installation.



> > Of course, LaTeX is
> > a big and complex beast that TeXLive manages well (instead
> > of the system-provided tools for managing the ports tree).
> > In my opinion, a good _integration with_ the ports tree is
> > important, so dependencies will be resolved properly (and
> > you won't end up havong both TeXLive _and_ teTeX on your
> > system for no particular need).
> 
> The problem is that if you hand over the management of the TeXLive install to
> tlmgr, the ports tree doesn't know and cannot know what is provided and what
> is depended on...

Correct. As I said, I'd suggest tlmgr could honor that case if
it is run on FreeBSD and update the system records accordingly,
so port management and pkg can work with that "foreign" installation
as if it would have been a valid installation done with the
system's default means.



> > On the other hand, this
> > might introduce demands of other "software compilations"
> > to move their management out of the system's range, so we
> > end up micro-managing many different sets of software in
> > their own specific way, abandoning the centralized means
> > of maintaining our software...
> 
> There is indeed no silver bullet.

True. However, a good integration with keeping an eye on the most
obvious and important side effects could help.

For example, the TEX_DEFAULT setting in /etc/make.conf is already
a good beginning to select between teTeX and TeXLive. Maybe something
similar could be added by tlmgr to satisfy port and package management
tools with the illusion that everything went fine? :-)



> > > Since TeXLive is very complete and
> > > self-contained, I don't have other ports that depend on TeX.
> > 
> > It's the port maintainers' task to take care of the proper
> > declaration of dependencies, and for system tools to handle
> > them. I don't think it is a big problem to make this consistent
> > with how TeXLive handles things.
> 
> It is not that simple. After every tlmgr run, you'd have to generate a new
> plist for the port. Since TeXLive is contained in one directory tree
> (/usr/local/texlive/) that part is relatively simple. But tlmgr can also
> install scripts or binaries. So after every tlmgr run, the list of binaries
> that the port provides and the list of libraries or interpreters (ports) that
> it requires would have to be updated. This is not trivial.

I recognize that complicated task, but I would like to say that
solving that problem (or at least "possible annoyance") would
really benefit "both worlds" - TeXLive can be managed with tlmgr
_and_ the system software records will keep working properly.





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 20:32:43 -, atar wrote:
> What does the '-u' option do? I've not find in the 'mount' man page any  
> explanation on this option.

That's strange. I'm currently looking at "man mount" on a
FreeBSD 8.2 system and the following paragraph is readable:

 -u  The -u flag indicates that the status of an already mounted file
 system should be changed.  Any of the options discussed above
 (the -o option) may be changed; also a file system can be changed
 from read-only to read-write or vice versa.  An attempt to change
 from read-write to read-only will fail if any files on the file
 system are currently open for writing unless the -f flag is also
 specified.  The set of options is determined by applying the
 options specified in the argument to -o and finally applying the
 -r or -w option.

The -u flag is referenced in other sections of the manpage.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Getting tlmgr working

2013-09-16 Thread Antonio Olivares
On Mon, Sep 16, 2013 at 1:19 PM, Jerry  wrote:

> Seriously though, tlmgr is the name of the package and configuration
> manager included in TeX Live. It operates completely separately from
> any package manager the operating system may provide. I fail to see why
> it was disabled. I think I will take the advice I was given and clear
> TeXLive from my system and then download and install it from it from
> "tug.org". I have been told it works perfectly and without any of the
> BS that FreeBSD apparently decided to attach to it. Again, if it wasn't
> broke, why did they feel the need to fix it? Are we sure that FreeBSD
> doesn't work for the government?
>
> --

Have you used the freebsd-texlive ports?

https://code.google.com/p/freebsd-texlive/

For a good while, Romain Tartiere has provided these ports which took
care of many complicated things that had not been done natively in
FreeBSD.

> Again, if it wasn't
> broke, why did they feel the need to fix it?


They* never fixed it, up till recently, texlive has officially been
added to the FreeBSD ports:

root@grullahighschool:~ # cat /usr/ports/UPDATING | grep 'texlive'
  Specifying TEX_DEFAULT=texlive, almost all of ports which use TeX
  The directory layout of them is as follows.  Please use print/texlive-full
   - print/texlive-full: meta port to install all of the TeXLive components
   - print/texlive-base: binary programs in TeXLive
   - print/texlive-texmf: macro and font data in TeXLive
   - print/texlive-infra: tlmgr dependency (Perl modules)

20130511:
  AFFECTS: users of TeX
  AUTHOR: h...@freebsd.org

  One can now choose TeXLive or teTeX by using TEX_DEFAULT.
  Specifying TEX_DEFAULT=texlive, almost all of ports which use TeX
  will install and depend on TeXLive-based ones.  Note that the
  default value is still "tetex" and the two cannot coexist.  You need
  to remove all of the TeX-related packages based on teTeX to try
  TeXLive.

20130506:
  AFFECTS: users of TeX
  AUTHOR: h...@freebsd.org

  TeXLive ports have been imported.  Although most of ports still depend
  on teTeX at this moment, they will be converted to use TeXLive.

  The directory layout of them is as follows.  Please use print/texlive-full
  if you are not familiar with how each component works.  Finer-grained
  ports will be added (specifically, meta ports for smaller installation
  and so on).  Note that the full installation needs around 3GB of disk space.

  teTeX-based ports and TeXLive are mutually exclusive.  This means TeXLive
  ports cannot be installed when teTeX is already installed.  You need
  to remove all of the TeX-related packages based on teTeX to try TeXLive.
  Migration procedure will be announced when conversion of the port
  dependency is completed.

  * Meta port
   - print/texlive-full: meta port to install all of the TeXLive components

  * Libraries
   - devel/tex-kpathsea: kpathsea library
   - devel/tex-web2c: WEB2C toolchain and TeX engines
   - print/tex-ptexenc: character code conversion library for pTeX

  * Base part of the TeXLive
   - print/texlive-base: binary programs in TeXLive
   - print/texlive-texmf: macro and font data in TeXLive
   - print/texlive-infra: tlmgr dependency (Perl modules)
   - print/tex-formats:

  * TeX Formats
   - print/tex-formats: TeX, LaTeX, PDFTeX, AMSTeX, ConTeXT, CSLaTeX,
   EplainTeX, METAFONT, MLTeX, PDFTeX, TeXsis
   - print/tex-aleph: Aleph/Lambda
   - print/tex-xetex: XeTeX
   - print/tex-luatex: LuaTeX
   - print/tex-jadetex: JadeTeX
   - print/tex-xmltex: XMLTeX
   - japanese/tex-ptex: pTeX

  * DVI ware
   - print/tex-xdvik: XDvi


It took a BIG WHILE to get texlive onboard natively on official
FreeBSD ports.  TeTeX has been depracated since 2006 and now it is
there, but people are never happy.

> Are we sure that FreeBSD
> doesn't work for the government?

Which government?  I hope not the U.S. government which is doing
things backwards and thinking on their feet instead of their brains
and not respecting *

Best Regards,


Antonio
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to log sshd access in a single file

2013-09-16 Thread Rick Miller
On Mon, Sep 16, 2013 at 2:44 PM, aurikus grande  wrote:

> >Most web servers handle their own logging.
> I do _not_ want the web server acces to be logged (at least as of now).
>

Which is fine, but still configured via your web server.


>Have you looked at /var/log/auth.log?
> yes, and as you mentioned in your previous update, it logs the success
> login (only). Unsuccessfull attempts are being sent to  /var/log/messages .
> So there are 2 separate files. I would like to have all sshd access
> attempts in one single file - regardless if they are successfull or
> unsuccessfull.
>

> Quotation: "I believe FreeBSD defaults to failed ssh authentication is
> logged to /var/log/messages while successful authentication is written to
> /var/log/auth.log."
>

I was incorrect.  Fail and success are both recorded here.  Even if this
were the case, the best way to accomplish what you're looking for is still
syslog.


> >Can you elaborate on your reasons for running sshd via inetd? I'm curious
> as I've never even heard of anyone attempting this.
> When i searched how to setup / configure sshd on internet, i found many
> hints to start it using inetd. Since it worked for me there was no reason
> to change it.
>

In general, most administrators will not run ssh via inetd.  A more common
configuration is detailed in the FreeBSD handbook at
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/openssh.html

-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to log sshd access in a single file

2013-09-16 Thread aurikus grande
>Most web servers handle their own logging.
I do _not_ want the web server acces to be logged (at least as of now).

>Have you looked at /var/log/auth.log?
yes, and as you mentioned in your previous update, it logs the success
login (only). Unsuccessfull attempts are being sent to  /var/log/messages .
So there are 2 separate files. I would like to have all sshd access
attempts in one single file - regardless if they are successfull or
unsuccessfull.

Quotation: "I believe FreeBSD defaults to failed ssh authentication is
logged to /var/log/messages while successful authentication is written to
/var/log/auth.log."

>Can you elaborate on your reasons for running sshd via inetd? I'm curious
as I've never even heard of anyone attempting this.
When i searched how to setup / configure sshd on internet, i found many
hints to start it using inetd. Since it worked for me there was no reason
to change it.

Best regards,
aurikus


2013/9/16 Rick Miller 

> On Mon, Sep 16, 2013 at 1:57 PM, aurikus grande  wrote:
>
>> Hello Rick,
>>
>> sorry that i did not reply to all, from now on i will use "reply to all".
>> Thanks for pointing it out.
>>
>> I will also open port 80 for web access, but i do not want to log those.
>> Because i expect a huge amount of traffic on my server.
>>
>
> Most web servers handle their own logging.
>
> So i only want to log successfull and unsuccessfull sshd access.
>>
>
> Have you looked at /var/log/auth.log?
>
> twist is part of the FreeBSD 9.1 base installation, i did not yet install
>> any other package.
>>
>
> That was my mistake, I sent the email before editing that out as I had
> intended.
>
> The idea behind using hosts.allow was because i could specify the rule by
>> the service (and not by the level of the message).
>>
>> And yes, in my case sshd is configured to run via inetd.
>>
>> You are correct, my main goal is to log all failed sshd attempts. If it
>> is easier to log successfull and failed attempts (to the same file), this
>> would also be fine for me.
>>
>
> Can you elaborate on your reasons for running sshd via inetd?  I'm curious
> as I've never even heard of anyone attempting this.
>
>
> --
> Take care
> Rick Miller
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Migration TeX/LaTeX: from teTeX --> TeXlive

2013-09-16 Thread Roland Smith
On Mon, Sep 16, 2013 at 01:57:51AM +0200, Polytropon wrote:
> On Sun, 15 Sep 2013 21:00:22 +0200, Roland Smith wrote:
> > Personally I don't think TeX is a good fit for the ports tree (because of
> > duplication of effort).

I have to add that I think that the chosen strategy (provide a full port and a
minimal port) is a good balance between functionality and maintenance workload.

> In conclusion, that could be said about many other software
> that brings its own package management.

More or less. Not all of those work equally well as tlmgr or the ports tree.

> Of course, LaTeX is
> a big and complex beast that TeXLive manages well (instead
> of the system-provided tools for managing the ports tree).
> In my opinion, a good _integration with_ the ports tree is
> important, so dependencies will be resolved properly (and
> you won't end up havong both TeXLive _and_ teTeX on your
> system for no particular need).

The problem is that if you hand over the management of the TeXLive install to
tlmgr, the ports tree doesn't know and cannot know what is provided and what
is depended on...

> On the other hand, this
> might introduce demands of other "software compilations"
> to move their management out of the system's range, so we
> end up micro-managing many different sets of software in
> their own specific way, abandoning the centralized means
> of maintaining our software...

There is indeed no silver bullet.

> > Since TeXLive is very complete and
> > self-contained, I don't have other ports that depend on TeX.
> 
> It's the port maintainers' task to take care of the proper
> declaration of dependencies, and for system tools to handle
> them. I don't think it is a big problem to make this consistent
> with how TeXLive handles things.

It is not that simple. After every tlmgr run, you'd have to generate a new
plist for the port. Since TeXLive is contained in one directory tree
(/usr/local/texlive/) that part is relatively simple. But tlmgr can also
install scripts or binaries. So after every tlmgr run, the list of binaries
that the port provides and the list of libraries or interpreters (ports) that
it requires would have to be updated. This is not trivial.

And if you ever run tlmgr outside of the port Makefile, the installed port's
information must be assumed to be out of date.

Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpr0OQulLtEk.pgp
Description: PGP signature


Re: Getting tlmgr working

2013-09-16 Thread Jerry
On Mon, 16 Sep 2013 19:39:17 +0200
Roland Smith articulated:

> On Mon, Sep 16, 2013 at 07:59:32AM -0400, Jerry wrote:
> > On Mon, 16 Sep 2013 08:26:09 +0200
> > Roland Smith articulated:
> > 
> > > On Sun, Sep 15, 2013 at 06:04:03PM -0400, Jerry wrote:
> > > > Has there been any movement on getting "tlmgr" working on
> > > > FreeBSD? The inability to get and install updates is annoying.
> > > 
> > > Basically there are two ways of dealing with TeXLive;
> > > 
> > > 1) Install it from ports. This also means using ports to update
> > > it. 2) Use the TeXLive installer to install it. In this case you
> > > can use tlmgr to update it.
> > > 
> > > I've used method 2 since 2007, and that has worked fine for me.
> > 
> > The problem is that the ports system is not keeping individual
> > TeXLive packages. 
> 
> My guess would be that this was a consideration between convenience
> and workload, given that TeXLive contains a gazillion packages. Check
> the archives of the freebsd-ports list for more info.
> 
> In _principle_ it would have been possible to make a port out of all
> CTAN/TeXLive packages. But the maintenance overhead would be _huge_.
> Plus, it takes a TeXpert to determine which specific packages you
> need to do something, and even most TeX users don't fall into that
> category. So that approach is unrealistic.
> 
> Given the amount of disk space on a modern PC, doing a full install
> would not be a problem for most people. (Unless you're trying to run
> TeXLive on a raspberry pi or a beaglebone, in which case I would
> respectfully question your sanity. :-) )
> 
> > There is an old adage, "If it ain't broke, don't fix it."
> > Unfortunately, in the case of "tlmgr", they failed to pay heed to
> > that advice. 
> 
> There were other considerations. Suppose a single "TeXLive" port was
> made, that would just let tlmgr do its thing. What would that port
> provide, and what would its dependencies be? That is _impossible_ for
> the ports system to tell, because it would be determined _outside_
> the ports system.
> 
> In this case you could get a situation that a program that depends on
> a part of TeXLive could be installed (because the TeXLive port is
> installed) but it wouldn't work because the right option wasn't
> selected in tlmgr. Not a good situation.
> 
> Another problem scenario is that you use tlmgr to install something
> that doesn't work because it needs a library that isn't installed yet.
> 
> > The ports system is not keeping individual TeXLive packages updated.
> 
> Indeed, but is that such a big deal?
> 
> TeX is a relatively mature piece of software. That's one of the
> reasons why there is only one release every year. I tend to update my
> TeXLive install once every year after the new release comes out, and
> that strategy has served me well over the years.
> 
> > Besides, using a big, complex system like the FreeBSD ports system
> > to keep the individual packages of a single program, in this case
> > TeXLive, updated when the program supplies its own mechanism for
> > doing so, is just another failed attempt at reinventing the wheel.
> 
> Damned if they do, damned if they don't? The thing is, TeXLive
> _isn't_ a single program, that is the basis of the problem.
> 
> > There area also a slew of other ports that fail to install if the
> > system is configured to run TeXLive. When they will get that
> > problem solved is anyone's guess.
> 
> Submitting PRs would help.

I was told by the maintain of the "*-freebsd-doc-*" ports that they
know there is a problem and that it will be looked into. Interestingly
enough, that is the exact same answer I use when I have no clue what is
wrong and no intention of doing anything about it in the immediate
future. Clearly, this should not have happened.

Seriously though, tlmgr is the name of the package and configuration
manager included in TeX Live. It operates completely separately from
any package manager the operating system may provide. I fail to see why
it was disabled. I think I will take the advice I was given and clear
TeXLive from my system and then download and install it from it from
"tug.org". I have been told it works perfectly and without any of the
BS that FreeBSD apparently decided to attach to it. Again, if it wasn't
broke, why did they feel the need to fix it? Are we sure that FreeBSD
doesn't work for the government?

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__



signature.asc
Description: PGP signature


Re: how to log sshd access in a single file

2013-09-16 Thread Matthew Seaman
On 16/09/2013 14:36, aurikus grande wrote:
> I try to add a line in /etc/hosts.allow which would allow and log all
> attempts using SSH (sshd).

Actually, by default all logins via ssh are already logged to
/var/log/auth.log

Verb. Sap.  tcpwrappers are mostly a lot less useful than they appear to
be.  Generally there's a much better way to do whatever you want already
in the FreeBSD base system, or failing that in a readily available port,
which will be more effective, less load on the system and that doesn't
require you to run everything out of inetd or recompile it specially
with tcpwrappers support.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




signature.asc
Description: OpenPGP digital signature


Re: persistence in freeBSD

2013-09-16 Thread atar

the text in your citation doesn't appear in the following URL:

http://www.freebsd.org/cgi/man.cgi?query=mount&apropos=0&sektion=0&manpath=FreeBSD+9.1-RELEASE&arch=i386&format=html

However, Thanks for the citation.

Regards,

atar.

Lowell Gilbert  write:

atar  writes:


What does the '-u' option do? I've not find in the 'mount' man page
any explanation on this option.


The man page includes:

 -u  The -u flag indicates that the status of an already mounted  
file
 system should be changed.  Any of the options discussed  
above
 (the -o option) may be changed; also a file system can be  
changed
 from read-only to read-write or vice versa.  An attempt to  
change
 from read-write to read-only will fail if any files on the  
file
 system are currently open for writing unless the -f flag is  
also

 specified.  The set of options is determined by applying the
 options specified in the argument to -o and finally  
applying the

 -r or -w option.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread Lowell Gilbert
atar  writes:
>
> What does the '-u' option do? I've not find in the 'mount' man page
> any explanation on this option.

The man page includes:

 -u  The -u flag indicates that the status of an already mounted file
 system should be changed.  Any of the options discussed above
 (the -o option) may be changed; also a file system can be changed
 from read-only to read-write or vice versa.  An attempt to change
 from read-write to read-only will fail if any files on the file
 system are currently open for writing unless the -f flag is also
 specified.  The set of options is determined by applying the
 options specified in the argument to -o and finally applying the
 -r or -w option.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to log sshd access in a single file

2013-09-16 Thread Rick Miller
Hi Aurikus,

Selecting "Reply all" when replying to messages on the list allows the
entire list to benefit from the discussion.


On Mon, Sep 16, 2013 at 11:05 AM, aurikus grande  wrote:

> Hello Rick.
>
> thanks a lot for your quick reply.
>
> Does your recommendation - to use syslog.conf mean instead - that i cant
> accomplish what i want with hosts.allow and twist ?
>

I am unfamiliar with twist and cannot authoritatively answer this question.
 Not to mention, it does not appear to be in base

I´m still reading through the man pages and try to understand how to
> configure syslog.conf.
>

I recommended syslog, because it is the stock logging mechanism for FreeBSD.

On my 9.1 system, /etc/syslog.conf contains:

auth.info;authpriv.info /var/log/auth.log

These facilities are both logging to /var/log/auth.log.

Your stated goal was logging of failed ssh attempts to your host.  The
above line in syslog.conf accomplishes this by sending the message to
/var/log/auth.log.

TCPWrappers will have no effect on logging of failed ssh attempts unless
sshd is configured to run via inetd.

I recommend pf or ipfw for filtering access to ssh.

-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread atar
What does the '-u' option do? I've not find in the 'mount' man page any  
explanation on this option.


Lowell Gilbert  wrote:


atar  writes:


Will the 'mount -o rw /' command work although the filesystem has
already been mounted as readonly?


You'll need the "-u" option as well.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Getting tlmgr working

2013-09-16 Thread Roland Smith
On Mon, Sep 16, 2013 at 07:59:32AM -0400, Jerry wrote:
> On Mon, 16 Sep 2013 08:26:09 +0200
> Roland Smith articulated:
> 
> > On Sun, Sep 15, 2013 at 06:04:03PM -0400, Jerry wrote:
> > > Has there been any movement on getting "tlmgr" working on FreeBSD?
> > > The inability to get and install updates is annoying.
> > 
> > Basically there are two ways of dealing with TeXLive;
> > 
> > 1) Install it from ports. This also means using ports to update it.
> > 2) Use the TeXLive installer to install it. In this case you can use
> > tlmgr to update it.
> > 
> > I've used method 2 since 2007, and that has worked fine for me.
> 
> The problem is that the ports system is not keeping individual TeXLive
> packages. 

My guess would be that this was a consideration between convenience and
workload, given that TeXLive contains a gazillion packages. Check the archives
of the freebsd-ports list for more info.

In _principle_ it would have been possible to make a port out of all
CTAN/TeXLive packages. But the maintenance overhead would be _huge_. Plus, it
takes a TeXpert to determine which specific packages you need to do
something, and even most TeX users don't fall into that category. So that
approach is unrealistic.

Given the amount of disk space on a modern PC, doing a full install would not
be a problem for most people. (Unless you're trying to run TeXLive on a
raspberry pi or a beaglebone, in which case I would respectfully question your
sanity. :-) )

> There is an old adage, "If it ain't broke, don't fix it." Unfortunately, in
> the case of "tlmgr", they failed to pay heed to that advice. 

There were other considerations. Suppose a single "TeXLive" port was made,
that would just let tlmgr do its thing. What would that port provide, and what
would its dependencies be? That is _impossible_ for the ports system to tell,
because it would be determined _outside_ the ports system.

In this case you could get a situation that a program that depends on a part
of TeXLive could be installed (because the TeXLive port is installed) but it
wouldn't work because the right option wasn't selected in tlmgr. Not a good
situation.

Another problem scenario is that you use tlmgr to install something that
doesn't work because it needs a library that isn't installed yet.

> The ports system is not keeping individual TeXLive packages updated.

Indeed, but is that such a big deal?

TeX is a relatively mature piece of software. That's one of the reasons why
there is only one release every year. I tend to update my TeXLive install once
every year after the new release comes out, and that strategy has served me
well over the years.

> Besides, using a big, complex system like the FreeBSD ports system to keep
> the individual packages of a single program, in this case TeXLive, updated
> when the program supplies its own mechanism for doing so, is just another
> failed attempt at reinventing the wheel.

Damned if they do, damned if they don't? The thing is, TeXLive _isn't_ a
single program, that is the basis of the problem.

> There area also a slew of other ports that fail to install if the system is
> configured to run TeXLive. When they will get that problem solved is
> anyone's guess.

Submitting PRs would help.


Roland
-- 
R.F.Smith   http://rsmith.home.xs4all.nl/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgpnVa6GeWgS8.pgp
Description: PGP signature


Re: how to log sshd access in a single file

2013-09-16 Thread aurikus grande
Hello Rick,

sorry that i did not reply to all, from now on i will use "reply to all".
Thanks for pointing it out.

I will also open port 80 for web access, but i do not want to log those.
Because i expect a huge amount of traffic on my server.

So i only want to log successfull and unsuccessfull sshd access.

twist is part of the FreeBSD 9.1 base installation, i did not yet install
any other package.

The idea behind using hosts.allow was because i could specify the rule by
the service (and not by the level of the message).

And yes, in my case sshd is configured to run via inetd.

You are correct, my main goal is to log all failed sshd attempts. If it is
easier to log successfull and failed attempts (to the same file), this
would also be fine for me.

Thanks in advance for your continued effort.

Best regards,
aurikus.


2013/9/16 Rick Miller 

> Hi Aurikus,
>
> Selecting "Reply all" when replying to messages on the list allows the
> entire list to benefit from the discussion.
>
>
> On Mon, Sep 16, 2013 at 11:05 AM, aurikus grande wrote:
>
>> Hello Rick.
>>
>> thanks a lot for your quick reply.
>>
>> Does your recommendation - to use syslog.conf mean instead - that i cant
>> accomplish what i want with hosts.allow and twist ?
>>
>
> I am unfamiliar with twist and cannot authoritatively answer this
> question.  Not to mention, it does not appear to be in base
>
> I´m still reading through the man pages and try to understand how to
>> configure syslog.conf.
>>
>
> I recommended syslog, because it is the stock logging mechanism for
> FreeBSD.
>
> On my 9.1 system, /etc/syslog.conf contains:
>
> auth.info;authpriv.info /var/log/auth.log
>
> These facilities are both logging to /var/log/auth.log.
>
> Your stated goal was logging of failed ssh attempts to your host.  The
> above line in syslog.conf accomplishes this by sending the message to
> /var/log/auth.log.
>
> TCPWrappers will have no effect on logging of failed ssh attempts unless
> sshd is configured to run via inetd.
>
> I recommend pf or ipfw for filtering access to ssh.
>
> --
> Take care
> Rick Miller
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread Adam Vande More
On Mon, Sep 16, 2013 at 3:58 PM, atar  wrote:

> the text in your citation doesn't appear in the following URL:
>
> http://www.freebsd.org/cgi/**man.cgi?query=mount&apropos=0&**
> sektion=0&manpath=FreeBSD+9.1-**RELEASE&arch=i386&format=html
>
>
Yes, it does.  Trying scrolling down further.  The options are listed in
alphabetical order.

-- 
Adam Vande More
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to log sshd access in a single file

2013-09-16 Thread Rick Miller
On Mon, Sep 16, 2013 at 1:57 PM, aurikus grande  wrote:

> Hello Rick,
>
> sorry that i did not reply to all, from now on i will use "reply to all".
> Thanks for pointing it out.
>
> I will also open port 80 for web access, but i do not want to log those.
> Because i expect a huge amount of traffic on my server.
>

Most web servers handle their own logging.

So i only want to log successfull and unsuccessfull sshd access.
>

Have you looked at /var/log/auth.log?

twist is part of the FreeBSD 9.1 base installation, i did not yet install
> any other package.
>

That was my mistake, I sent the email before editing that out as I had
intended.

The idea behind using hosts.allow was because i could specify the rule by
> the service (and not by the level of the message).
>
> And yes, in my case sshd is configured to run via inetd.
>
> You are correct, my main goal is to log all failed sshd attempts. If it is
> easier to log successfull and failed attempts (to the same file), this
> would also be fine for me.
>

Can you elaborate on your reasons for running sshd via inetd?  I'm curious
as I've never even heard of anyone attempting this.


-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


About Transparent Superpages and Non-transparent superapges

2013-09-16 Thread Patrick Dung
Hello,

1.
Transparent Superpages was in FreeBSD for a few years.
I would like to know if there is any benchmark or real world performance 
experience about this setting.

2.
I have seen somewhere that non-transparent superpages was being developed in 
HEAD too.
Any insight on it? Please correct me if it is not the case.

Thanks and regards,
Patrick Dung
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread Lowell Gilbert
atar  writes:

> Will the 'mount -o rw /' command work although the filesystem has
> already been mounted as readonly?

You'll need the "-u" option as well.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread atar
Will the 'mount -o rw /' command work although the filesystem has already  
been mounted as readonly?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: how to log sshd access in a single file

2013-09-16 Thread Rick Miller
On Mon, Sep 16, 2013 at 9:36 AM, aurikus grande  wrote:

> Hello,
>
> just a few days ago i setup my first FreeBSD server, so i am new to this
> OS.
>
> I already tried to find the information i was looking for, but to no luck.
>
> I try to add a line in /etc/hosts.allow which would allow and log all
> attempts using SSH (sshd).


[ snip ]

I would recommend using the auth and authpriv facilities for syslog.  Check
the syslog.conf manpage for configuring such activity.  I believe FreeBSD
defaults to failed ssh authentication is logged to /var/log/messages while
successful authentication is written to /var/log/auth.log.

-- 
Take care
Rick Miller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread Sam Fourman Jr.
On Mon, Sep 16, 2013 at 1:25 PM, atar  wrote:

> Thanks for replying, Steve.
>
> As for your question, I mean if it is possible for example to write a file
> to the filesystem and that the file will not be deleted on the next boot.
> actually, I didn't succeed to write a file to the filesystem  because it is
> automatically mounted as readonly filesystem, so my question implies also
> how to mount it also with write access during the boot process.
>
> Regards,
>
> atar.
>
> __**_
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
> To unsubscribe, send any mail to "freebsd-questions-**
> unsubscr...@freebsd.org "
>


mount -o rw /
-- 

Sam Fourman Jr.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread atar

Thanks for replying, Steve.

As for your question, I mean if it is possible for example to write a file  
to the filesystem and that the file will not be deleted on the next boot.  
actually, I didn't succeed to write a file to the filesystem  because it  
is automatically mounted as readonly filesystem, so my question implies  
also how to mount it also with write access during the boot process.


Regards,

atar.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: persistence in freeBSD

2013-09-16 Thread Steve O'Hara-Smith
On Mon, 16 Sep 2013 15:20:00 -
atar  wrote:

> Is there any way to enable persistence between reboots when using
> FreeBSD from a USB stick?

What exactly do you mean by "enable persistence between reboots" ?

-- 
Steve O'Hara-Smith 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


how to log sshd access in a single file

2013-09-16 Thread aurikus grande
Hello,

just a few days ago i setup my first FreeBSD server, so i am new to this OS.

I already tried to find the information i was looking for, but to no luck.

I try to add a line in /etc/hosts.allow which would allow and log all
attempts using SSH (sshd).

I found http://www.freebsd.org/doc/handbook/tcpwrappers.html, which
mentions twist as the only way to accomplish this.

So i created a line in allow.hosts which reads as follows:

sshd : ALL : twist /bin/echo "a% from h% attempted to acces d%" >> \
  \var\log\ssh-connections.log : allow

sshd for the service
ALL for all ip-addresses
allow to allow access
and the text in between should make sure that the file ssh-connections is
being updated.

The file already exists, i used root access to create it.

But it does not work as expected.

Could you please point me where i did it wrong.

Thanks in advance for your help.

Best regards,
aurikus
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: test if script called by cron

2013-09-16 Thread Jerry
On Mon, 16 Sep 2013 12:26:59 +0100
Paul Macdonald articulated:

> 
> Hi,
> 
> Is there a simple way of testing whether a given script was called
> via cron,
> 
> I'd rather find a solution that would work from within the script
> rather than setting an environment variable in the crontab.
> 
> thanks
> Paul.
> 
> (anyone here going to EuroBSD con?)

If you want to learn if the running script was called via cron, this
would work, assuming you are running Bash.

if [[ ! -t 0 ]]; then
echo "Running from Cron"
fi

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

persistence in freeBSD

2013-09-16 Thread atar

Hi there!

Is there any way to enable persistence between reboots when using FreeBSD  
from a USB stick?


Thanks in advance!

atar.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: test if script called by cron

2013-09-16 Thread Dan Nelson
In the last episode (Sep 16), Paul Macdonald said:
> Is there a simple way of testing whether a given script was called via cron,
> 
> I'd rather find a solution that would work from within the script rather 
> than setting an environment variable in the crontab.

You check to see if stdin is a terminal, but that's not conclusive.  One way
to know for sure is to look at the name of the process that launched you:

if [ ! -t 0 ] ; then
 echo "no tty, possibly run from cron"
fi

parent=$(ps -o command= -p $PPID)
case $parent in 
 *cron* ) echo "parent is $parent, almost certainly cron" ;;
esac

-- 
Dan Nelson
dnel...@allantgroup.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: test if script called by cron

2013-09-16 Thread Polytropon
On Mon, 16 Sep 2013 12:26:59 +0100, Paul Macdonald wrote:
> Is there a simple way of testing whether a given script was called via cron,
> 
> I'd rather find a solution that would work from within the script rather 
> than setting an environment variable in the crontab.

I'd suggest the script creates a file (lock file or,
much easier, just a simple normal file) at its beginning:

#!/bin/sh
/usr/bin/touch /tmp/scriptrun
# ... your script content here ...

You could also output the date command to that file
to see when the script has been called:

#!/bin/sh
/bin/date "+%Y-%m-%d %H:%M:%S" > /tmp/scriptrun
# ... your script content here ...

Of course you would have to manually remove that file
after you have verified its existence and content.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Getting tlmgr working

2013-09-16 Thread Jerry
On Mon, 16 Sep 2013 08:26:09 +0200
Roland Smith articulated:

> On Sun, Sep 15, 2013 at 06:04:03PM -0400, Jerry wrote:
> > Has there been any movement on getting "tlmgr" working on FreeBSD?
> > The inability to get and install updates is annoying.
> 
> Basically there are two ways of dealing with TeXLive;
> 
> 1) Install it from ports. This also means using ports to update it.
> 2) Use the TeXLive installer to install it. In this case you can use
> tlmgr to update it.
> 
> I've used method 2 since 2007, and that has worked fine for me.

The problem is that the ports system is not keeping individual TeXLive
packages. I primarily use TeXLive on an MS Windows system where it runs
faster and is easier to maintain then on FreeBSD. There is an old
adage, "If it ain't broke, don't fix it." Unfortunately, in the case of
"tlmgr", they failed to pay heed to that advice. The ports system is
not keeping individual TeXLive packages updated. Besides, using a big,
complex system like the FreeBSD ports system to keep the individual
packages of a single program, in this case TeXLive, updated when the
program supplies its own mechanism for doing so, is just another failed
attempt at reinventing the wheel. As my deceased grandmother would say
when she witnessed something incredibly stupid being done, "What the
hell were they thinking?" There area also a slew of other ports that
fail to install if the system is configured to run TeXLive. When they
will get that problem solved is anyone's guess. The bottom line is the
port and all of the assorted problems with it and other ports it
affects were not resolved prior to its release. At the very least, a
nice large warning banner should have been displayed when the port was
first installed clearly listing all of the known problems and side
effects of the port.

However, that is just my 2¢.

-- 
Jerry ♔

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the Reply-To header.
__



signature.asc
Description: PGP signature


test if script called by cron

2013-09-16 Thread Paul Macdonald


Hi,

Is there a simple way of testing whether a given script was called via cron,

I'd rather find a solution that would work from within the script rather 
than setting an environment variable in the crontab.


thanks
Paul.

(anyone here going to EuroBSD con?)

--
-
Paul Macdonald
IFDNRG Ltd
Web and video hosting
-
t: 0131 5548070
m: 07970339546
e: p...@ifdnrg.com
w: http://www.ifdnrg.com
-
IFDNRG
40 Maritime Street
Edinburgh
EH6 6SA

High Specification Dedicated Servers from £100.00pm


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


rctl within jail

2013-09-16 Thread David Demelier
Hello there,

I wanted to use rctl within a jail to add more fine grained setting for
some users, and default ones to. But it does not seem to work. Is it
supported? Do we need to add a special flag to the jail creation?

# rctl -a loginclass:default:maxproc:deny=30
rctl: rctl_add_rule: Operation not permitted

Regards,

David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"