Mercurial > pkg
changeset 17:cb1a44d080db
consolidating init scripts.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 09 Jan 2013 11:41:55 +0000 |
parents | cd47c42f1d0a |
children | b38744722d75 |
files | src/create-install-dirs.pl src/create-skeleton.sh src/system-init.pl |
diffstat | 3 files changed, 109 insertions(+), 110 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/src/create-install-dirs.pl Wed Jan 09 11:38:31 2013 +0000 1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 1.3 @@ -1,106 +0,0 @@ 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 -
2.1 --- a/src/create-skeleton.sh Wed Jan 09 11:38:31 2013 +0000 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,4 +0,0 @@ 2.4 -mkdir -pv /pkg/defaults 2.5 -ln -sfv $(pwd)/profile /pkg/defaults/.profile 2.6 -ln -sfv $(pwd)/hg-wrapper /pkg/defaults/.hg-wrapper 2.7 -
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/src/system-init.pl Wed Jan 09 11:41:55 2013 +0000 3.3 @@ -0,0 +1,109 @@ 3.4 +#!/usr/bin/env perl 3.5 + 3.6 +@create_install_cmd = 3.7 + ("groupadd", "--force", "install"); 3.8 +print "@create_install_cmd\n"; 3.9 +system(@create_install_cmd) and die $!; 3.10 + 3.11 +sub create_install_dir{ 3.12 + @install_cmd = 3.13 + ("install", "-d", "-m", 3.14 + "775", "-o", "root", "-g", 3.15 + "install", $_[0]); 3.16 + print "@install_cmd\n"; 3.17 + system(@install_cmd) and die $!;} 3.18 + 3.19 +@install_dirs = qw( 3.20 +/usr/bin 3.21 +/usr/sbin 3.22 +/usr/include 3.23 +/usr/lib 3.24 +/usr/man/man1 3.25 +/usr/man/man2 3.26 +/usr/man/man3 3.27 +/usr/man/man4 3.28 +/usr/man/man5 3.29 +/usr/man/man6 3.30 +/usr/man/man7 3.31 +/usr/man/man8 3.32 +/usr/doc 3.33 +/usr/info 3.34 +/usr/local/man/man1 3.35 +/usr/local/man/man2 3.36 +/usr/local/man/man3 3.37 +/usr/local/man/man4 3.38 +/usr/local/man/man5 3.39 +/usr/local/man/man6 3.40 +/usr/local/man/man7 3.41 +/usr/local/man/man8 3.42 +/usr/local/doc 3.43 +/usr/local/info 3.44 +/usr/share 3.45 +/usr/share/dict 3.46 +/usr/share/doc 3.47 +/usr/share/info 3.48 +/usr/share/locale 3.49 +/usr/share/man/man1 3.50 +/usr/share/man/man2 3.51 +/usr/share/man/man3 3.52 +/usr/share/man/man4 3.53 +/usr/share/man/man5 3.54 +/usr/share/man/man6 3.55 +/usr/share/man/man7 3.56 +/usr/share/man/man8 3.57 +/usr/share/nls 3.58 +/usr/share/misc 3.59 +/usr/share/terminfo 3.60 +/usr/share/zoneinfo 3.61 +/usr/share/i18n 3.62 +/usr/share/aclocal 3.63 +/usr/local/bin 3.64 +/usr/local/etc 3.65 +/usr/local/include 3.66 +/usr/local/lib 3.67 +/usr/local/sbin 3.68 +/usr/local/share 3.69 +/usr/local/share/dict 3.70 +/usr/local/share/doc 3.71 +/usr/local/share/info 3.72 +/usr/local/share/locale 3.73 +/usr/local/share/man/man1 3.74 +/usr/local/share/man/man2 3.75 +/usr/local/share/man/man3 3.76 +/usr/local/share/man/man4 3.77 +/usr/local/share/man/man5 3.78 +/usr/local/share/man/man6 3.79 +/usr/local/share/man/man7 3.80 +/usr/local/share/man/man8 3.81 +/usr/local/share/nls 3.82 +/usr/local/share/misc 3.83 +/usr/local/share/terminfo 3.84 +/usr/local/share/zoneinfo 3.85 +/opt 3.86 +/opt/doc 3.87 +/opt/info 3.88 +/opt/bin 3.89 +/opt/include 3.90 +/opt/lib 3.91 +/opt/man/man1 3.92 +/opt/man/man2 3.93 +/opt/man/man3 3.94 +/opt/man/man4 3.95 +/opt/man/man5 3.96 +/opt/man/man6 3.97 +/opt/man/man7 3.98 +/opt/man/man8 3.99 +/var/lib 3.100 +/var/opt 3.101 +/etc 3.102 +/etc/opt 3.103 +/sbin 3.104 +/bin 3.105 +/lib); 3.106 + 3.107 +foreach $install_dir(@install_dirs){ 3.108 + create_install_dir($install_dir);} 3.109 + 3.110 +`mkdir -pv /pkg/defaults` 3.111 +`ln -sfv $(pwd)/profile /pkg/defaults/.profile` 3.112 +`ln -sfv $(pwd)/hg-wrapper /pkg/defaults/.hg-wrapper`