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