Skip to content
Snippets Groups Projects
Commit 7dbb10dc authored by Christopher Spinrath's avatar Christopher Spinrath
Browse files

Move functions from remaster_rootfs to common_functions

The moved functions will be used by fill_offline repo, too.
parent 331b4378
No related branches found
No related tags found
No related merge requests found
......@@ -56,3 +56,33 @@ function install_debs()
echo "done."
done
}
function divert_initctl()
{
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
# Fix sysvinit legacy invoke-rc.d issue with nonexisting scripts
dpkg-divert --local --rename --add /usr/sbin/invoke-rc.d
ln -s /bin/true /usr/sbin/invoke-rc.d
}
function revert_initctl()
{
rm /sbin/initctl
dpkg-divert --local --rename --remove /sbin/initctl
# Fix sysvinit legacy invoke-rc.d issue with nonexisting scripts
rm /usr/sbin/invoke-rc.d
dpkg-divert --local --rename --remove /usr/sbin/invoke-rc.d
}
function get_packages_from_file()
{
FILENAME="$1"
if [ ! -e "$FILENAME" ]; then
echo "Error: package file $FILENAME does not exist!"
exit 3
fi
echo "$(grep -v "^#" "$FILENAME" | tr '\n' ' ')"
}
......@@ -40,24 +40,6 @@ if [ ! -d "$SCRIPT_DIR" ]; then
exit 2
fi
function divert_initctl()
{
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl
# Fix sysvinit legacy invoke-rc.d issue with nonexisting scripts
dpkg-divert --local --rename --add /usr/sbin/invoke-rc.d
ln -s /bin/true /usr/sbin/invoke-rc.d
}
function revert_initctl()
{
rm /sbin/initctl
dpkg-divert --local --rename --remove /sbin/initctl
# Fix sysvinit legacy invoke-rc.d issue with nonexisting scripts
rm /usr/sbin/invoke-rc.d
dpkg-divert --local --rename --remove /usr/sbin/invoke-rc.d
}
function prepare_install()
{
if [ -e "$CONTRIB_DIR/lip_sources.list" ]; then
......@@ -70,18 +52,6 @@ function prepare_install()
apt-get update
}
function get_packages_from_file()
{
FILENAME="$1"
if [ ! -e "$FILENAME" ]; then
echo "Error: package file $FILENAME does not exist!"
exit 3
fi
echo "$(grep -v "^#" "$FILENAME" | tr '\n' ' ')"
}
function install_packages_from_file()
{
APT_OPTIONS=$2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment