]> arthur.barton.de Git - netatalk.git/blob - contrib/shell_utils/afpd-mtab.pl
6f7dba591b08138e48c623b2166ce28cda8c25bf
[netatalk.git] / contrib / shell_utils / afpd-mtab.pl
1 #! /usr/bin/perl
2 #
3 # Create an afpd.mtab on standard output from the mtab-format file on standard
4 # input.
5 #
6 #       afpd-mtab.pl < /etc/mtab > /etc/afpd.mtab
7 #
8 #    Modification history:
9 #
10 # created.  -- rgr, 9-Apr-01.
11 #
12
13 print("# afpd.mtab, generated by afpd-mtab.pl on ",
14       `date`);
15 while (<>) {
16     ($device, $mount_point, $fstype) = split;
17     next
18         if $device eq 'none' || $mount_point eq '/boot';
19     printf("%2d %-10s %s\n", ++$did_index, $device, $mount_point);
20 }