~mvo/apt-setup/extras-ubuntu-repo

« back to all changes in this revision

Viewing changes to finish-install.d/10apt-cdrom-setup

  • Committer: cjwatson
  • Date: 2009-08-13 13:04:12 UTC
  • mto: This revision was merged to the branch mainline in revision 185.
  • Revision ID: vcs-imports@canonical.com-20090813130412-igkfddxv9a67xhuy
Upgrade to debhelper v7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
set -e
 
3
 
 
4
# Disable netinst CD image in sources.list if any other sources are present
 
5
if [ -e /cdrom/.disk/base_installable ] && \
 
6
   [ -e /cdrom/.disk/cd_type ] && \
 
7
   [ "$(cat /cdrom/.disk/cd_type)" = not_complete ] && \
 
8
   grep -q "^deb \(ht\|f\)tp" /target/etc/apt/sources.list; then
 
9
        logger -t finish-install "Disabling netinst CD in sources.list"
 
10
        sed -i "/^deb cdrom:/s/^/#/" /target/etc/apt/sources.list
 
11
        log-output -t finish-install chroot /target apt-get update
 
12
fi