You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bootstrap-fixup.in 1.1KB

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. set -e
  3. . /etc/lsb-release
  4. echo "deb http://HOSTIP:3142/archive.ubuntu.com/ubuntu $DISTRIB_CODENAME main universe" > $1/etc/apt/sources.list
  5. echo "deb http://HOSTIP:3142/security.ubuntu.com/ubuntu $DISTRIB_CODENAME-security main universe" >> $1/etc/apt/sources.list
  6. echo "deb http://HOSTIP:3142/archive.ubuntu.com/ubuntu $DISTRIB_CODENAME-updates main universe" >> $1/etc/apt/sources.list
  7. echo '127.0.1.1 gitian' >> /etc/hosts
  8. # If LXC
  9. if grep /lxc/gitian /proc/1/cgroup > /dev/null; then
  10. adduser --disabled-password --gecos ubuntu --quiet ubuntu || true
  11. apt-get remove -y rsyslog
  12. dpkg-divert --local --rename --add /sbin/initctl
  13. ln -s /bin/true /sbin/initctl
  14. dpkg-divert --local --rename --add /usr/bin/ischroot
  15. ln -s /bin/true /usr/bin/ischroot
  16. # Prevent interaction with init during upgrades
  17. dpkg-divert --local --rename --add /usr/sbin/policy-rc.d
  18. echo 'exit 101' > /usr/sbin/policy-rc.d
  19. chmod +x /usr/sbin/policy-rc.d
  20. ## These are superceded by the policy-rc.d fix above
  21. # for pkg in lxc cgmanager udev plymouth dmsetup upstart; do
  22. # echo $pkg hold | dpkg --set-selections || true
  23. # done
  24. fi