Dmitry Yu Okunev лет назад: 8
Родитель
Сommit
8ceab88892

+ 1 - 1
auto/build

@@ -7,6 +7,7 @@ set -e
 #export ADDITIONAL_PACKAGES="$(cat /srv/mephi-edu-linux-teacher-packages/* | tr " \t" "\n\n" | sort | uniq | grep -v '^$')"
 #echo "$ADDITIONAL_PACKAGES" > /srv/live-build/chroot/packages-to-install.list
 ionice -c 3 lb build noauto "${@}" 2>&1 | tee /tmp/live-build.log
+umount /srv/live-build/chroot/mnt/chroots 2>/dev/null || true
 
 lb chroot_hooks --force
 
@@ -22,7 +23,6 @@ ionice -c 3 mksquashfs /srv/live-build/chroot /srv/share/nfs/mephi-edu/live/file
 ##mkdir /srv/live-build/chroot/mnt/chroots
 #mount --bind /srv/share/nfs/chroots /srv/live-build/chroot/mnt/chroots
 #chroot /srv/live-build/chroot update-texdeps
-#umount /srv/live-build/chroot/mnt/chroots
 
 exit 0
 grep eth0 /srv/live-build/chroot/etc/network/interfaces >/dev/null || sed -e "s%auto br0%auto eth0\niface eth0 inet dhcp\n\tup route add -net 10.0.0.0/24 gw 192.168.2.2\nauto br0%" -i /srv/live-build/chroot/etc/network/interfaces

+ 1 - 5
config/hooks/2500-install-sid-texlive.hook.chroot

@@ -5,10 +5,6 @@ cat > /etc/ld.so.conf.d/texlive.conf << EOF
 /mnt/chroots/texlive/srv/current/jessie/lib
 EOF
 
-mount 127.0.0.1:/srv/share/nfs/chroots /mnt/chroots
-update-texdeps
-ldconfig -v
-fmtutil-sys --all
-umount /mnt/chroots
+unshare -m wrapper-update-texdeps
 
 exit 0

+ 9 - 0
config/includes.chroot/usr/local/sbin/wrapper-update-texdeps

@@ -0,0 +1,9 @@
+#!/bin/bash -e
+
+mount 127.0.0.1:/srv/share/nfs/chroots /mnt/chroots
+update-texdeps
+ldconfig -v
+fmtutil-sys --all
+umount /mnt/chroots || true
+
+exit 0