summaryrefslogtreecommitdiffstats
path: root/kernel/post-install
blob: a746f6719f2f997eb06fb2801066207b4b759a7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SCRIPT_VERSION="pakxe.4"
SRC=/tmp/work
WDIR=$SRC/nutyx-initrd
if [ ! -d $SRC ]; then 
	mkdir -p $SRC
fi
tar -C $SRC -xf /boot/nutyx-initrd.* || exit 1
cp /root/bin/install-${SCRIPT_VERSION}.ash \
$WDIR/rootfs/install/
for i in $WDIR/rootfs/install/setup-install \
         $WDIR/rootfs/install/setup-mirroir
do
        sed -i "s|#INSTALL#|install-$SCRIPT_VERSION.ash|" $i || exit 1
done

for i in setup-grub functions setup-main main.txt
do
        sed -i "s|#VERSION#|$SCRIPT_VERSION|" $WDIR/rootfs/install/$i || exit 1
done

# Copie des modules kernels
mkdir -p $WDIR/rootfs/lib/modules
cp -a /lib/modules/* \
$WDIR/rootfs/lib/modules/

cp -a /lib/firmware \
$WDIR/rootfs/lib/

# Copie du script d'install
cp /root/bin/install-${SCRIPT_VERSION}.ash $WDIR/rootfs/install/

# Création de l'initrd
sh $WDIR/script/mkinitrd $WDIR
cp $WDIR/iso/isolinux/initrd /boot/nutyx-initrd
rm -r $SRC