]> Raphaƫl G. Git Repositories - distcook/blob - lib/install.sh
df24193aa662aea2b69381e028bfd8d4b17355b4
[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 bc \
44 bind \
45 bind-utils \
46 binutils \
47 btrfs-progs \
48 cronie-anacron \
49 cryptmount \
50 cryptsetup \
51 deltarpm \
52 dhcp-client \
53 dosfstools \
54 gdb \
55 gdisk \
56 git \
57 git-prompt \
58 git-svn \
59 gnupg \
60 gnupg2 \
61 groff \
62 hddtemp \
63 hdparm \
64 info \
65 kernel-firmware \
66 kernel-firmware-nonfree \
67 lftp \
68 lm_sensors \
69 locales \
70 locales-en \
71 lshw \
72 lsof \
73 luit \
74 lynx \
75 mageia-gfxboot-theme \
76 man \
77 man-pages \
78 mdadm \
79 microcode \
80 mirrordir \
81 mlocate \
82 msec \
83 nail \
84 ntfs-3g \
85 openssh-server \
86 openvpn \
87 p7zip \
88 parted \
89 patch \
90 pax \
91 pciutils \
92 postfix \
93 rsnapshot \
94 rsync \
95 screen \
96 sectool \
97 shorewall \
98 shorewall-ipv6 \
99 smartmontools \
100 strace \
101 sudo \
102 traceroute \
103 tree \
104 unzip \
105 whois \
106 xauth \
107 xfsprogs \
108 zip
109
110 # Install locale
111 if [ ! -z "$LOCALE_ALT" -a "$LOCALE_ALT" != 'en' ]; then
112 LC_ALL=C urpmi --downloader=wget --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root \
113 locales-${LOCALE_ALT} \
114 man-pages-${LOCALE_ALT}
115 fi
116
117 # Install ihttpd
118 LC_ALL=C urpmi --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root ${IHTTPD_RPM}