]> Raphaƫl G. Git Repositories - distcook/blob - lib/install.sh
b945901240b4d742d21418c2fd9d95c30f4e9f0e
[distcook] / lib / install.sh
1 #! /bin/sh -e
2
3 # Failsafe check
4 if [ -z "$PWD" -o "$PWD" = "/" ]; then
5 echo "Don't run it from slash moron"
6 exit 1;
7 fi
8
9 # Check for trashed %_tmppath by ~/.rpmmacros or else
10 if [ "$(rpm --eval '%_tmppath')" != "/var/tmp" ]; then
11 echo "Run with a clean %_tmppath rpm macro moron (start me from sudo su -)"
12 exit 1;
13 fi
14
15 # Check if we have a root directory
16 if [ -d "$PWD/root" ]; then
17 read -p 'Confirm root directory destruction (yes/NO): ' confirm
18 if [ "$confirm" = "yes" -o "$confirm" = "YES" ]; then
19 rm -fr "$PWD/root"
20 elif [ ! "$confirm" = "no" -a ! "$confirm" = "NO" ]; then
21 echo "I need a clean directory"
22 exit 1;
23 else
24 read -p "I re-install over existing directory, press a key to continue"
25 fi
26 fi
27
28 # Make root directory
29 mkdir -p "$PWD/root"
30
31 # Install base config
32 LC_ALL=C urpmi --downloader=wget --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root filesystem basesystem-minimal rpm urpmi grub kernel-server-latest vim-enhanced wget
33
34 # Reinstall lockdev to fix missing lock group on binary
35 LC_ALL=C urpmi --downloader=wget --no-verify-rpm --no-recommends --noclean --auto --replacepkgs --replacefiles --root=$PWD/root lockdev
36
37 # Install remaining
38 LC_ALL=C urpmi --downloader=wget --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root \
39 acl \
40 acpi \
41 acpid \
42 bash-completion \
43 bind \
44 bind-utils \
45 binutils \
46 btrfs-progs \
47 cronie-anacron \
48 cryptmount \
49 cryptsetup \
50 deltarpm \
51 dhcp-client \
52 dosfstools \
53 gdb \
54 gdisk \
55 mageia-gfxboot-theme \
56 git \
57 git-prompt \
58 git-svn \
59 gnupg \
60 gnupg2 \
61 hdparm \
62 info \
63 kernel-firmware \
64 kernel-firmware-nonfree \
65 lftp \
66 lm_sensors \
67 locales \
68 locales-en \
69 lshw \
70 lsof \
71 luit \
72 lynx \
73 man \
74 man-pages \
75 mdadm \
76 microcode \
77 mirrordir \
78 mlocate \
79 msec \
80 nail \
81 ntfs-3g \
82 openssh-server \
83 openvpn \
84 p7zip \
85 parted \
86 patch \
87 pax \
88 pciutils \
89 postfix \
90 rsnapshot \
91 rsync \
92 sectool \
93 shorewall \
94 shorewall-ipv6 \
95 smartmontools \
96 strace \
97 sudo \
98 traceroute \
99 tree \
100 unzip \
101 whois \
102 xauth \
103 xfsprogs \
104 zip
105
106 # Install locale
107 if [ ! -z "$LOCALE_ALT" -a "$LOCALE_ALT" != 'en' ]; then
108 LC_ALL=C urpmi --downloader=wget --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root \
109 locales-${LOCALE_ALT} \
110 man-pages-${LOCALE_ALT}
111 fi
112
113 # Install ihttpd
114 LC_ALL=C urpmi --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root ${IHTTPD_RPM}