1 <samba:parameter xmlns:samba="http://samba.org/common">
2 <term><anchor id="DFREECOMMAND"/>dfree command (G)</term>
3 <listitem><para>The <parameter moreinfo="none">dfree command</parameter> setting should
4 only be used on systems where a problem occurs with the internal
5 disk space calculations. This has been known to happen with Ultrix,
6 but may occur with other operating systems. The symptom that was
7 seen was an error of "Abort Retry Ignore" at the end of each
8 directory listing.</para>
10 <para>This setting allows the replacement of the internal routines to
11 calculate the total disk space and amount available with an external
12 routine. The example below gives a possible script that might fulfill
15 <para>The external program will be passed a single parameter indicating
16 a directory in the filesystem being queried. This will typically consist
17 of the string <filename moreinfo="none">./</filename>. The script should return two
18 integers in ASCII. The first should be the total disk space in blocks,
19 and the second should be the number of available blocks. An optional
20 third return value can give the block size in bytes. The default
21 blocksize is 1024 bytes.</para>
23 <para>Note: Your script should <emphasis>NOT</emphasis> be setuid or
24 setgid and should be owned by (and writeable only by) root!</para>
26 <para>Default: <emphasis>By default internal routines for
27 determining the disk capacity and remaining space will be used.
30 <para>Example: <command moreinfo="none">dfree command = /usr/local/samba/bin/dfree
33 <para>Where the script dfree (which must be made executable) could be:</para>
35 <para><programlisting format="linespecific">
37 df $1 | tail -1 | awk '{print $2" "$4}'
38 </programlisting></para>
40 <para>or perhaps (on Sys V based systems):</para>
42 <para><programlisting format="linespecific">
44 /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
45 </programlisting></para>
47 <para>Note that you may have to replace the command names
48 with full path names on some systems.</para>