Mercurial > pkg
diff 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 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/system-init.pl Wed Jan 09 11:41:55 2013 +0000 1.3 @@ -0,0 +1,109 @@ 1.4 +#!/usr/bin/env perl 1.5 + 1.6 +@create_install_cmd = 1.7 + ("groupadd", "--force", "install"); 1.8 +print "@create_install_cmd\n"; 1.9 +system(@create_install_cmd) and die $!; 1.10 + 1.11 +sub create_install_dir{ 1.12 + @install_cmd = 1.13 + ("install", "-d", "-m", 1.14 + "775", "-o", "root", "-g", 1.15 + "install", $_[0]); 1.16 + print "@install_cmd\n"; 1.17 + system(@install_cmd) and die $!;} 1.18 + 1.19 +@install_dirs = qw( 1.20 +/usr/bin 1.21 +/usr/sbin 1.22 +/usr/include 1.23 +/usr/lib 1.24 +/usr/man/man1 1.25 +/usr/man/man2 1.26 +/usr/man/man3 1.27 +/usr/man/man4 1.28 +/usr/man/man5 1.29 +/usr/man/man6 1.30 +/usr/man/man7 1.31 +/usr/man/man8 1.32 +/usr/doc 1.33 +/usr/info 1.34 +/usr/local/man/man1 1.35 +/usr/local/man/man2 1.36 +/usr/local/man/man3 1.37 +/usr/local/man/man4 1.38 +/usr/local/man/man5 1.39 +/usr/local/man/man6 1.40 +/usr/local/man/man7 1.41 +/usr/local/man/man8 1.42 +/usr/local/doc 1.43 +/usr/local/info 1.44 +/usr/share 1.45 +/usr/share/dict 1.46 +/usr/share/doc 1.47 +/usr/share/info 1.48 +/usr/share/locale 1.49 +/usr/share/man/man1 1.50 +/usr/share/man/man2 1.51 +/usr/share/man/man3 1.52 +/usr/share/man/man4 1.53 +/usr/share/man/man5 1.54 +/usr/share/man/man6 1.55 +/usr/share/man/man7 1.56 +/usr/share/man/man8 1.57 +/usr/share/nls 1.58 +/usr/share/misc 1.59 +/usr/share/terminfo 1.60 +/usr/share/zoneinfo 1.61 +/usr/share/i18n 1.62 +/usr/share/aclocal 1.63 +/usr/local/bin 1.64 +/usr/local/etc 1.65 +/usr/local/include 1.66 +/usr/local/lib 1.67 +/usr/local/sbin 1.68 +/usr/local/share 1.69 +/usr/local/share/dict 1.70 +/usr/local/share/doc 1.71 +/usr/local/share/info 1.72 +/usr/local/share/locale 1.73 +/usr/local/share/man/man1 1.74 +/usr/local/share/man/man2 1.75 +/usr/local/share/man/man3 1.76 +/usr/local/share/man/man4 1.77 +/usr/local/share/man/man5 1.78 +/usr/local/share/man/man6 1.79 +/usr/local/share/man/man7 1.80 +/usr/local/share/man/man8 1.81 +/usr/local/share/nls 1.82 +/usr/local/share/misc 1.83 +/usr/local/share/terminfo 1.84 +/usr/local/share/zoneinfo 1.85 +/opt 1.86 +/opt/doc 1.87 +/opt/info 1.88 +/opt/bin 1.89 +/opt/include 1.90 +/opt/lib 1.91 +/opt/man/man1 1.92 +/opt/man/man2 1.93 +/opt/man/man3 1.94 +/opt/man/man4 1.95 +/opt/man/man5 1.96 +/opt/man/man6 1.97 +/opt/man/man7 1.98 +/opt/man/man8 1.99 +/var/lib 1.100 +/var/opt 1.101 +/etc 1.102 +/etc/opt 1.103 +/sbin 1.104 +/bin 1.105 +/lib); 1.106 + 1.107 +foreach $install_dir(@install_dirs){ 1.108 + create_install_dir($install_dir);} 1.109 + 1.110 +`mkdir -pv /pkg/defaults` 1.111 +`ln -sfv $(pwd)/profile /pkg/defaults/.profile` 1.112 +`ln -sfv $(pwd)/hg-wrapper /pkg/defaults/.hg-wrapper`