aboutsummaryrefslogtreecommitdiff
path: root/scripts/DB410C/21-customize
blob: 8bba4a0a424a7c305110718bfb5e9d715a28c38e (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
#!/bin/bash
set -e

if [ -f $target/etc/NetworkManager/NetworkManager.conf ]; then
   cat << EOF >> $target/etc/NetworkManager/NetworkManager.conf
[device]
wifi.scan-rand-mac-address=no
EOF
fi

cat << EOF > $target/etc/fstab
/dev/disk/by-partlabel/rootfs / ext4   rw,relatime,data=ordered 0 1
EOF

# In case initrd doesn't exist, create it, else update
if [ -f $target/boot/initrd.img-${KVERS} ]
then
    chroot $target /usr/sbin/update-initramfs -u -k ${KVERS}
else
    chroot $target /usr/sbin/update-initramfs -c -k ${KVERS}
fi

OUT=$FAI/out
mkdir -p $OUT
cp $target/boot/vmlinuz-${KVERS} $OUT/
cp $target/usr/lib/linux-image-${KVERS}/$fdtfile $OUT/
cp $target/boot/initrd.img-${KVERS} $OUT/
cp $target/boot/config-${KVERS} $OUT/
cp $target/boot/System.map-${KVERS} $OUT/