156 |
ln -snf ${target} ${MROOT}/etc/systemd/system/default.target |
ln -snf ${target} ${MROOT}/etc/systemd/system/default.target |
157 |
|
|
158 |
# convert modules.autoload |
# convert modules.autoload |
159 |
local modules |
if [ -f ${MROOT}/etc/modules.autoload ] |
|
# get only lines which are not commented or empty; |
|
|
# if we get any items than the modules.autoload is in use |
|
|
modules=$(sed -e '/^#/d' -e '/^$/d' ${MROOT}/etc/modules.autoload) |
|
|
if [[ ! -z ${modules} ]] |
|
160 |
then |
then |
161 |
[ ! -d ${MROOT}/etc/modules-load.d ] && install -d ${MROOT}/etc/modules-load.d |
local modules |
162 |
echo -e "# Converted by systemd install from /etc/modules.autoload\n#\n#" \ |
# get only lines which are not commented or empty; |
163 |
> ${MROOT}/etc/modules-load.d/modules.autoload.conf |
# if we get any items than the modules.autoload is in use |
164 |
cat ${MROOT}/etc/modules.autoload \ |
modules=$(sed -e '/^#/d' -e '/^$/d' ${MROOT}/etc/modules.autoload) |
165 |
>> ${MROOT}/etc/modules-load.d/modules.autoload.conf |
if [[ ! -z ${modules} ]] |
166 |
|
then |
167 |
|
[ ! -d ${MROOT}/etc/modules-load.d ] && install -d ${MROOT}/etc/modules-load.d |
168 |
|
echo -e "# Converted by systemd install from /etc/modules.autoload\n#\n#" \ |
169 |
|
> ${MROOT}/etc/modules-load.d/modules.autoload.conf |
170 |
|
cat ${MROOT}/etc/modules.autoload \ |
171 |
|
>> ${MROOT}/etc/modules-load.d/modules.autoload.conf |
172 |
|
fi |
173 |
fi |
fi |
174 |
|
|
175 |
# check mtab, and replace with a symlink if requiered |
# check mtab, and replace with a symlink if requiered |