Annotation of loncom/build/setup_rpm_binaryroot.pl, revision 1.2

1.1       harris41    1: #!/usr/bin/perl
                      2: 
                      3: # The LearningOnline Network with CAPA
                      4: # setup_rpm_binaryroot.pl - script to generate files to make LON-CAPA-setup rpm
                      5: #
1.2     ! harris41    6: # $Id: setup_rpm_binaryroot.pl,v 1.1 2002/01/09 22:14:57 harris41 Exp $
1.1       harris41    7: #
                      8: # Written by Scott Harrison, harris41@msu.edu
                      9: #
                     10: # Copyright Michigan State University Board of Trustees
                     11: #
                     12: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
                     13: #
                     14: # LON-CAPA is free software; you can redistribute it and/or modify
                     15: # it under the terms of the GNU General Public License as published by
                     16: # the Free Software Foundation; either version 2 of the License, or
                     17: # (at your option) any later version.
                     18: #
                     19: # LON-CAPA is distributed in the hope that it will be useful,
                     20: # but WITHOUT ANY WARRANTY; without even the implied warranty of
                     21: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     22: # GNU General Public License for more details.
                     23: #
                     24: # You should have received a copy of the GNU General Public License
                     25: # along with LON-CAPA; if not, write to the Free Software
                     26: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
                     27: #
                     28: # http://www.lon-capa.org/
                     29: #
                     30: # YEAR=2002
                     31: # 1/9 - Scott Harrison
                     32: #
                     33: ###
                     34: 
                     35: `install -d SetupBinaryRoot`;
1.2     ! harris41   36: `install -d SetupBinaryRoot/etc`;
1.1       harris41   37: 
                     38: # /etc/passwd
                     39: 
                     40: open OUT,">SetupBinaryRoot/etc/passwd";
                     41: print OUT<<END;
                     42: root::0:0:root:/root:/bin/bash
                     43: bin:!!:1:1:bin:/bin:
                     44: daemon:!!:2:2:daemon:/sbin:
                     45: adm:!!:3:4:adm:/var/adm:
                     46: lp:!!:4:7:lp:/var/spool/lpd:
                     47: sync:!!:5:0:sync:/sbin:/bin/sync
                     48: shutdown:!!:6:0:shutdown:/sbin:/sbin/shutdown
                     49: halt:!!:7:0:halt:/sbin:/sbin/halt
                     50: mail:!!:8:12:mail:/var/spool/mail:
                     51: news:!!:9:13:news:/var/spool/news:
                     52: uucp:!!:10:14:uucp:/var/spool/uucp:
                     53: operator:!!:11:0:operator:/root:
                     54: games:!!:12:100:games:/usr/games:
                     55: gopher:!!:13:30:gopher:/usr/lib/gopher-data:
                     56: ftp:!!:14:50:FTP User:/home/ftp:
                     57: nobody:!!:99:99:Nobody:/:
                     58: www:!!:500:500:www:/home/www:/bin/bash
                     59: END
                     60: close OUT;
                     61: 
                     62: # /etc/group
                     63: 
                     64: open OUT,">SetupBinaryRoot/etc/group";
                     65: print OUT<<END;
                     66: root::0:root
                     67: bin::1:root,bin,daemon
                     68: daemon::2:root,bin,daemon
                     69: sys::3:root,bin,adm
                     70: adm::4:root,adm,daemon
                     71: tty::5:
                     72: disk::6:root
                     73: lp::7:daemon,lp
                     74: mem::8:
                     75: kmem::9:
                     76: wheel::10:root
                     77: mail::12:mail
                     78: news::13:news
                     79: uucp::14:uucp
                     80: man::15:
                     81: games::20:
                     82: gopher::30:
                     83: dip::40:
                     84: ftp::50:
                     85: nobody::99:
                     86: users::100:
                     87: www::500:
                     88: END
                     89: close OUT;
                     90: 
                     91: # /etc/hosts.deny
                     92: 
                     93: open OUT,">SetupBinaryRoot/etc/hosts.deny";
                     94: print OUT<<END;
                     95: ALL: ALL
                     96: END
                     97: close OUT;
                     98:     
                     99: # /home/www
                    100: 
                    101: `install -o www -g users -m 0700 -d SetupBinaryRoot/home/www`;
                    102: 
                    103: # /etc/pam.d
                    104: 
                    105: `install -d SetupBinaryRoot/etc/pam.d`;
                    106: 
                    107: # /etc/pam.d/passwd
                    108: 
                    109: open OUT,">SetupBinaryRoot/etc/pam.d/passwd";
                    110: print OUT<<END;
                    111: #%PAM-1.0
                    112: auth       required     /lib/security/pam_pwdb.so shadow nullok
                    113: account    required     /lib/security/pam_pwdb.so
                    114: password   required     /lib/security/pam_cracklib.so retry=3
                    115: password   required     /lib/security/pam_pwdb.so use_authtok nullok
                    116: END
                    117: close OUT;
                    118: 
                    119: # /etc/pam.d/login
                    120: 
                    121: open OUT,">SetupBinaryRoot/etc/pam.d/login";
                    122: print OUT<<END;
                    123: #%PAM-1.0
                    124: auth       required     /lib/security/pam_securetty.so
                    125: auth       required     /lib/security/pam_pwdb.so shadow nullok
                    126: auth       required     /lib/security/pam_nologin.so
                    127: account    required     /lib/security/pam_pwdb.so
                    128: password   required     /lib/security/pam_cracklib.so
                    129: password   required     /lib/security/pam_pwdb.so nullok use_authtok
                    130: session    required     /lib/security/pam_pwdb.so
                    131: session    optional     /lib/security/pam_console.so
                    132: END
                    133: close OUT;

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>