initramfs-init: adding support for multiple repos when using alpine_repo=
1 unresolved thread
Adding support for comma separated list of URL and directories in the alpine_repo= cmdline option. Adding this support allows packages to be installed from multiple repositories on boot such as main, community, and vendor specific repositories. In addition to directories and URL, this patch allows auto detected repositories to be combined with manually specified repositories.
Example usage is:
alpine_repo=auto,http://foo.org/alpine/edge/main,http://foo.org/alpine/edge/community
Merge request reports
Activity
Filter activity
246 echo "$ALPINE_REPO" 246 for ALPINE_REPO_LINE in $(echo "$ALPINE_REPO" | tr ',' ' ' ); do 247 if is_url "$ALPINE_REPO_LINE"; then 248 echo "$ALPINE_REPO_LINE" 249 elif [ -d "$ALPINE_REPO_LINE" ];then 250 echo "$ALPINE_REPO_LINE" 251 elif [ "$ALPINE_REPO_LINE" = "auto" ]; then 252 find /media/* -name .boot_repository -type f -maxdepth 3 \ 253 | sed 's:/.boot_repository$::' 254 fi 255 done 256 unset ALPINE_REPO_LINE 247 257 else 248 258 find /media/* -name .boot_repository -type f -maxdepth 3 \ 249 259 | sed 's:/.boot_repository$::' 250 260 fi 245 if [ -n "$ALPINE_REPO" ]; then 246 for ALPINE_REPO_LINE in $(echo "$ALPINE_REPO" | tr ',' ' ' ); do 247 if is_url "$ALPINE_REPO_LINE"; then 248 echo "$ALPINE_REPO_LINE" 249 elif [ -d "$ALPINE_REPO_LINE" ];then 250 echo "$ALPINE_REPO_LINE" 251 elif [ "$ALPINE_REPO_LINE" = "auto" ]; then 252 find /media/* -name .boot_repository -type f -maxdepth 3 \ 253 | sed 's:/.boot_repository$::' 254 fi 255 done 256 unset ALPINE_REPO_LINE 257 else 258 find /media/* -name .boot_repository -type f -maxdepth 3 \ 259 | sed 's:/.boot_repository$::' 260 fi 245 local repo 246 IFS=,; for repo in ${ALPINE_REPO:-auto}; do 247 case "$line" in 248 auto) find /media/* -name .boot_repository -type f -maxdepth 3 \ 249 | sed 's:/.boot_repository$::' 250 ;; 251 *) echo "$line";; 252 esac 253 done
A few more things needs to be fixed:
- manpage needs to be updated
- currenly the nlplug-findfs will add
-n
(to make nlplug-findfs reutrn success even if no boot repository file was added) if alpine_repo is an url. we need adapt this so we pass-n
to nlplug-findfs if the list is only urls.
We can probably clean up the
do_networking
part a bit while at it.I will have to postpone this.
Please register or sign in to reply