]> Raphaƫl G. Git Repositories - distcook/blob - lib/install.sh
Switch to single btrfs data device
[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 grub2 grub2-mageia-theme 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 #XXX: to avoid boot time warning
111 # drakx-kbd-mouse-x11 \
112 # polkit-agent-none \
113
114 # Install locale
115 if [ ! -z "$LOCALE_ALT" -a "$LOCALE_ALT" != 'en' ]; then
116 LC_ALL=C urpmi --downloader=wget --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root \
117 locales-${LOCALE_ALT} \
118 man-pages-${LOCALE_ALT}
119 fi
120
121 # Install ihttpd
122 if [ ! -z "${IHTTPD_RPM}" -a -f "${IHTTPD_RPM}" ]; then
123 LC_ALL=C urpmi --no-verify-rpm --no-recommends --noclean --auto --root=$PWD/root ${IHTTPD_RPM}
124 fi