annotate src/system-init.pl @ 17:cb1a44d080db

consolidating init scripts.
author Robert McIntyre <rlm@mit.edu>
date Wed, 09 Jan 2013 11:41:55 +0000
parents
children 4fbe69d24a9c
rev   line source
rlm@17 1 #!/usr/bin/env perl
rlm@17 2
rlm@17 3 @create_install_cmd =
rlm@17 4 ("groupadd", "--force", "install");
rlm@17 5 print "@create_install_cmd\n";
rlm@17 6 system(@create_install_cmd) and die $!;
rlm@17 7
rlm@17 8 sub create_install_dir{
rlm@17 9 @install_cmd =
rlm@17 10 ("install", "-d", "-m",
rlm@17 11 "775", "-o", "root", "-g",
rlm@17 12 "install", $_[0]);
rlm@17 13 print "@install_cmd\n";
rlm@17 14 system(@install_cmd) and die $!;}
rlm@17 15
rlm@17 16 @install_dirs = qw(
rlm@17 17 /usr/bin
rlm@17 18 /usr/sbin
rlm@17 19 /usr/include
rlm@17 20 /usr/lib
rlm@17 21 /usr/man/man1
rlm@17 22 /usr/man/man2
rlm@17 23 /usr/man/man3
rlm@17 24 /usr/man/man4
rlm@17 25 /usr/man/man5
rlm@17 26 /usr/man/man6
rlm@17 27 /usr/man/man7
rlm@17 28 /usr/man/man8
rlm@17 29 /usr/doc
rlm@17 30 /usr/info
rlm@17 31 /usr/local/man/man1
rlm@17 32 /usr/local/man/man2
rlm@17 33 /usr/local/man/man3
rlm@17 34 /usr/local/man/man4
rlm@17 35 /usr/local/man/man5
rlm@17 36 /usr/local/man/man6
rlm@17 37 /usr/local/man/man7
rlm@17 38 /usr/local/man/man8
rlm@17 39 /usr/local/doc
rlm@17 40 /usr/local/info
rlm@17 41 /usr/share
rlm@17 42 /usr/share/dict
rlm@17 43 /usr/share/doc
rlm@17 44 /usr/share/info
rlm@17 45 /usr/share/locale
rlm@17 46 /usr/share/man/man1
rlm@17 47 /usr/share/man/man2
rlm@17 48 /usr/share/man/man3
rlm@17 49 /usr/share/man/man4
rlm@17 50 /usr/share/man/man5
rlm@17 51 /usr/share/man/man6
rlm@17 52 /usr/share/man/man7
rlm@17 53 /usr/share/man/man8
rlm@17 54 /usr/share/nls
rlm@17 55 /usr/share/misc
rlm@17 56 /usr/share/terminfo
rlm@17 57 /usr/share/zoneinfo
rlm@17 58 /usr/share/i18n
rlm@17 59 /usr/share/aclocal
rlm@17 60 /usr/local/bin
rlm@17 61 /usr/local/etc
rlm@17 62 /usr/local/include
rlm@17 63 /usr/local/lib
rlm@17 64 /usr/local/sbin
rlm@17 65 /usr/local/share
rlm@17 66 /usr/local/share/dict
rlm@17 67 /usr/local/share/doc
rlm@17 68 /usr/local/share/info
rlm@17 69 /usr/local/share/locale
rlm@17 70 /usr/local/share/man/man1
rlm@17 71 /usr/local/share/man/man2
rlm@17 72 /usr/local/share/man/man3
rlm@17 73 /usr/local/share/man/man4
rlm@17 74 /usr/local/share/man/man5
rlm@17 75 /usr/local/share/man/man6
rlm@17 76 /usr/local/share/man/man7
rlm@17 77 /usr/local/share/man/man8
rlm@17 78 /usr/local/share/nls
rlm@17 79 /usr/local/share/misc
rlm@17 80 /usr/local/share/terminfo
rlm@17 81 /usr/local/share/zoneinfo
rlm@17 82 /opt
rlm@17 83 /opt/doc
rlm@17 84 /opt/info
rlm@17 85 /opt/bin
rlm@17 86 /opt/include
rlm@17 87 /opt/lib
rlm@17 88 /opt/man/man1
rlm@17 89 /opt/man/man2
rlm@17 90 /opt/man/man3
rlm@17 91 /opt/man/man4
rlm@17 92 /opt/man/man5
rlm@17 93 /opt/man/man6
rlm@17 94 /opt/man/man7
rlm@17 95 /opt/man/man8
rlm@17 96 /var/lib
rlm@17 97 /var/opt
rlm@17 98 /etc
rlm@17 99 /etc/opt
rlm@17 100 /sbin
rlm@17 101 /bin
rlm@17 102 /lib);
rlm@17 103
rlm@17 104 foreach $install_dir(@install_dirs){
rlm@17 105 create_install_dir($install_dir);}
rlm@17 106
rlm@17 107 `mkdir -pv /pkg/defaults`
rlm@17 108 `ln -sfv $(pwd)/profile /pkg/defaults/.profile`
rlm@17 109 `ln -sfv $(pwd)/hg-wrapper /pkg/defaults/.hg-wrapper`