Skip to content

Commit

Permalink
Changes: Support for extra repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohammad Anwari committed Nov 21, 2011
1 parent 4eaff23 commit a3e8a1b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions config.example
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ SCRIPT=/usr/share/debootstrap/scripts/sid
# The components
COMPONENTS="main"

# Extra repository if you need more software coming from another repositories,
# this is a full sources.list lines, and new line is represented by a pipe
# you can add as many as you want. This will go to
# /etc/apt/sources.list.d/extra.list
# EXTRA_REPOSITORY="deb http://another.repository/line distribution components|"
# EXTRA_REPOSITORY+="deb http://yet.another.repository/line distribution components|"
# EXTRA_REPOSITORY+="deb http://yet.more.another.repository/line distribution components|"

# Hidden extra repository if you need more software coming from another repositories,
# but you don't want the end user to see them. The repository will be removed from
# /etc/apt/sources.list.d after installation of the packages
# This bear the same format as EXTRA_REPOSITORY
# EXTRA_REPOSITORY_HIDDEN="deb http://another.repository/line distribution components|"
# EXTRA_REPOSITORY_HIDDEN+="deb http://yet.another.repository/line distribution components|"
# EXTRA_REPOSITORY_HIDDEN+="deb http://yet.more.another.repository/line distribution components|"

###

# This is the list of the packages installed in the CD
Expand Down
13 changes: 13 additions & 0 deletions pabrik-cc/install-system
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ cat << @@EOF > $ROOTFS/etc/apt/sources.list
deb $MIRROR $DIST $COMPONENTS
@@EOF

if [ -n $EXTRA_REPOSITORY ];then
echo $EXTRA_REPOSITORY | sed -e 's/|/\n/g'> $ROOTFS/etc/apt/sources.list.d/extra.list
fi

if [ -n $EXTRA_REPOSITORY_HIDDEN ];then
echo $EXTRA_REPOSITORY_HIDDEN | sed -e 's/|/\n/g'> $ROOTFS/etc/apt/sources.list.d/hidden.list
fi

refresh_repository
install_package $PACKAGES $KERNEL

Expand All @@ -38,3 +46,8 @@ fi

cp $ROOTFS/boot/initrd.img* $DISK/$LIVE_SYSTEM/initrd.img
cp $ROOTFS/boot/vmlinuz* $DISK/$LIVE_SYSTEM/vmlinuz

if [ -d $ROOTFS/etc/apt/sources.list.d/hidden.list ];then
rm -f $ROOTFS/etc/apt/sources.list.d/hidden.list
refresh_repository
fi

0 comments on commit a3e8a1b

Please sign in to comment.