-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path14-install_packages
executable file
·44 lines (35 loc) · 1.2 KB
/
14-install_packages
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
36
37
38
39
40
41
42
43
44
#!/bin/bash -eu
. 00-common
#
# Build a minimal chroot where some critical utilities
# (grub, rsync, mkisofs, mksquashfs, trunc, cdtest, cksfv...) will run.
#
# trap "umount $ROOTDIR/proc" EXIT
mkdir -p "$ROOTDIR/dev"
mount --bind /dev "$ROOTDIR/dev"
mkdir -p "$ROOTDIR/proc"
mount -t proc proc "$ROOTDIR/proc"
mkdir -p "$ROOTDIR/sys"
mount -t sysfs sys "$ROOTDIR/sys"
apt-get \
$apt_options \
-o Dir::State::status="$DPKG_STATEDIR/status" \
-o Apt::Immediate-Configure="false" \
-o DPkg::Options::=--root="$ROOTDIR" \
-o DPkg::Options::=--force-architecture \
-o Debug::NoLocking="true" \
-o PackageManager::Configure="smart" \
--yes \
install $(cat packages_cd.txt) | tee -a apt.log
chroot "$ROOTDIR" uhu-pkg postinst +
# Prevent some services to be started in the livecd
chroot "$ROOTDIR" ldconfig -X
touch "$ROOTDIR/etc/.updated"
touch "$ROOTDIR/var/.updated"
# chroot "$ROOTDIR" dpkg-query -W -f='${Package} ${Version}\n' \* > "$BASEDIR"/installed_packages_$DESKTOP.txt
chroot "$ROOTDIR" dpkg-query -W -f='${Package}\n' \* > "$BASEDIR"/installed_packages_$DESKTOP.txt
touch "$ROOTDIR"/etc/fstab
# hostname beállítás
if [ ! -f "$ROOTDIR"/etc/hostname ]; then
echo "localhost" > "$ROOTDIR"/etc/hostname
fi