[Linux]挂载本地yum源 脚本
! /bin/bash
echo '[cdrom]' > /etc/yum.repos.d/cdrom.repo
echo 'name=cdrom' >> /etc/yum.repos.d/cdrom.repo
echo 'baseurl=file:///mnt' >> /etc/yum.repos.d/cdrom.repo
echo 'enable=1' >> /etc/yum.repos.d/cdrom.repo
echo 'gpgcheck=0' >> /etc/yum.repos.d/cdrom.repo
mount /dev/cdrom /mnt
yum list
echo 'Done!'