Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 9 commits
  • 9 files changed
  • 0 commit comments
  • 2 contributors
Commits on Jul 06, 2012
@Ratler Ratler lunar-tools: lids plugin should return 2 during PRE_REMOVE d7396f0
@Ratler Ratler systemd.plugin: Fixed handling of added, renamed or removed services
plugin_systemd_configure()
- Now properly asks if a new or renamed service should be enabled
- Now also stop and disable a removed service before the service files has
  been removed from disk

plugin_systemd_disable_services_pre_remove()
- This function will properly disable and stop a service on module removal
42d6320
Commits on Jul 07, 2012
@sofar sofar systemd: UI support was moved to a separate package. 75d9756
@sofar sofar systemd: if this doesn't make people understand that this is a bad op…
…tion, .....
62771cc
@Ratler Ratler systemd.plugin: Fix to get around word boundary limits of grep and sed e383934
@sofar sofar Merge pull request #5 from Ratler/systemd-plugin
systemd.plugin: Fix to get around word boundary limits of grep and sed
a4443cc
@sofar sofar lunar: update to v1. 335d436
@sofar sofar theedge: this is now a fake module pointing at lunar sources. c6745ce
Commits on Jul 08, 2012
@sofar sofar syslinux: retain indentation of old sections. 404186c
View
7 system/lunar/BUILD
@@ -1,7 +0,0 @@
-(
-
- prepare_install &&
- rm -fr /var/lib/lunar/functions/*
- ./install
-
-) > $C_FIFO 2>&1
View
16 system/lunar/DETAILS
@@ -1,16 +1,12 @@
MODULE=lunar
- VERSION=20110822
- SOURCE=$MODULE.tar.bz2
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE
- SOURCE_URL=http://lunar-linux.org/lunar/
+ VERSION=1
+ SOURCE=$MODULE-$VERSION.tar.bz2
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+ SOURCE_URL=http://lunar-linux.org/lunar/lunar/
+ SOURCE_VFY=isha1:e2088bf0f8495d7681f3fac458c38fe1a00b3013
WEB_SITE=http://lunar-linux.org
ENTERED=20020218
- UPDATED=$VERSION
- USE_CACHE=off
- CLEAR_CACHE=on
- PARTIAL=off
- KEEP_SOURCE=off
- AUTORESURRECT=off
+ UPDATED=20120707
SHORT="lunar contains the package management tools for Lunar-Linux."
cat << EOF
lunar - Tools package management by source.
View
2  system/syslinux/plugin.d/bootloader-syslinux.plugin
@@ -49,6 +49,7 @@ plugin_kernel_updatebootloader_syslinux() {
fi
TMP=$(temp_create)
+ IFS=$'\n'
while read LINE ; do
if [ -z "$DONE" ]; then
if echo "$LINE" | grep -q "^\s*label" ; then
@@ -59,6 +60,7 @@ plugin_kernel_updatebootloader_syslinux() {
fi
echo "$LINE" >> $TMP
done < /boot/extlinux/extlinux.conf
+ IFS=$' \t\n'
cp $TMP /boot/extlinux/extlinux.conf
temp_destroy $TMP
View
2  system/systemd/CONFIGURE
@@ -1 +1 @@
-mquery SYSV_COMPAT "Enable SysV compatibility?" y "--with-sysvinit-path=/etc/init.d --with-sysvrcd-path=/etc" "--with-sysvinit-path= --with-sysvrcd-path="
+mquery IM_AN_IDIOT "Are you stupid and want a life of misery and disaster? (Enable SysV compatibility?)" n "--with-sysvinit-path=/etc/init.d --with-sysvrcd-path=/etc" "--with-sysvinit-path= --with-sysvrcd-path="
View
2  system/systemd/DEPENDS
@@ -8,6 +8,4 @@ depends pciutils
depends intltool
depends gperf
-# broken currently
-#optional_depends "libnotify" "--enable-gtk" "--disable-gtk" "for user interface tools and notify support"
optional_depends "cryptsetup" "--enable-libcryptsetup" "--disable-libcryptsetup" "for Device-mapper crypto encryption"
View
56 system/systemd/plugin.d/systemd.plugin
@@ -6,27 +6,40 @@
#############################################################
# #
# Copyright 2011 by Auke Kok under GPLv2 #
+# Parts Copyrighted 2012 by Stefan Wold under GPLv2 #
# #
#############################################################
plugin_systemd_configure()
{
- local SERVICES SERVICE SYSTEMD_SERVICES
+ local SERVICES SERVICE SYSTEMD_SERVICES SYSTEMD_SERVICE SYSTEMD_TEMP FOUND
debug_msg "plugin_systemd_configure ($@)"
- if ! grep -q SYSTEMD_SERVICES $DEPENDS_CONFIG/$MODULE &&
- [ -d $SCRIPT_DIRECTORY/systemd.d ]; then
+ if [ -d $SCRIPT_DIRECTORY/systemd.d ]; then
cd $SCRIPT_DIRECTORY/systemd.d
SERVICES=$(ls -1)
- SYSTEMD_SERVICES=
+ SYSTEMD_SERVICES=$(get_module_config SYSTEMD_SERVICES)
for SERVICE in $SERVICES; do
# don't ask for '@' services - these should always be installed but
- # never linked directly.
+ # never linked directly. Also ask for new or renamed services.
if echo $SERVICE | grep -q @ ; then
continue
fi
+
+ # Keep processing new or renamed services. This is a bit of a hack
+ # but the previous solution using grep was not possible even with
+ # word boundary flag due to possible chars in a servce like '-' and '.'.
+ FOUND=false
+ for SYSTEMD_SERVICE in $SYSTEMD_SERVICES; do
+ if [ "$SERVICE" == "$SYSTEMD_SERVICE" ]; then
+ FOUND=true
+ break
+ fi
+ done
+ [ "$FOUND" == "true" ] && continue
+
message "${MESSAGE_COLOR}$SERVICE: $(grep Description= $SERVICE | cut -d= -f2-)${DEFAULT_COLOR}"
if query "Invoke $SERVICE via systemd automatically at boot ?" y
then
@@ -39,6 +52,25 @@ plugin_systemd_configure()
done
cd $SCRIPT_DIRECTORY
+ # Look for renamed or removed services and stop and disable them.
+ # If we don't do it here it will be too late and there will be rogue
+ # processes left behind after a successful install
+ for SYSTEMD_SERVICE in $SYSTEMD_SERVICES; do
+ FOUND=false
+ for SERVICE in $SERVICES; do
+ if [ "$SYSTEMD_SERVICE" == "$SERVICE" ]; then
+ FOUND=true
+ SYSTEMD_TEMP+=" $SERVICE"
+ break
+ fi
+ done
+ [ "$FOUND" == "true" ] && continue
+
+ verbose_msg "Stopping removed service ($SYSTEMD_SERVICE)"
+ systemctl stop $SYSTEMD_SERVICE &> /dev/null
+ systemctl disable $SYSTEMD_SERVICE &> /dev/null
+ done
+ SYSTEMD_SERVICES=$SYSTEMD_TEMP
set_module_config "SYSTEMD_SERVICES" "$SYSTEMD_SERVICES"
fi
return 2
@@ -102,7 +134,21 @@ plugin_systemd_tmpfilesd_post_build() {
return 2
}
+plugin_systemd_disable_services_pre_remove() {
+ local SYSTEMD_SERVICES
+ debug_msg "plugin_systemd_disable_services_pre_remove ($@)"
+
+ SYSTEMD_SERVICES=$(get_module_config SYSTEMD_SERVICES)
+ for SERVICE in $SYSTEMD_SERVICES; do
+ verbose_msg "Stopping and disabling systemd service ($SERVICE)"
+ systemctl stop $SERVICE &> /dev/null
+ systemctl disable $SERVICE &> /dev/null
+ done
+
+ return 2
+}
plugin_register BUILD_CONFIGURE plugin_systemd_configure
plugin_register BUILD_POST_BUILD plugin_systemd_post_build
plugin_register BUILD_POST_BUILD plugin_systemd_tmpfilesd_post_build
+plugin_register BUILD_PRE_REMOVE plugin_systemd_disable_services_pre_remove
View
7 system/theedge/BUILD
@@ -1,7 +0,0 @@
-(
-
- prepare_install &&
- rm -fr /var/lib/lunar/functions/*
- ./install
-
-) > $C_FIFO 2>&1
View
14 system/theedge/DETAILS
@@ -1,15 +1,11 @@
MODULE=theedge
- VERSION=20110625
- SOURCE=$MODULE.tar.bz2
-SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE
- SOURCE_URL=http://lunar-linux.org/lunar/
+ VERSION=1
+ SOURCE=lunar-$VERSION.tar.bz2
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/lunar-$VERSION
+ SOURCE_URL=http://lunar-linux.org/lunar/lunar/
WEB_SITE=http://lunar-linux.org
ENTERED=20020218
- UPDATED=$VERSION
- USE_CACHE=off
- CLEAR_CACHE=on
- PARTIAL=off
- KEEP_SOURCE=off
+ UPDATED=20120707
AUTORESURRECT=off
SHORT="development version of lunar core tools from Lunar-Linux."
cat << EOF
View
2  utils/lunar-tools/plugin.d/lids.plugin
@@ -16,6 +16,8 @@ plugin_lids_pre_remove()
if [ -f /var/log/lunar/permissions/$MODULE-$VERSION ] ; then
rm -f /var/log/lunar/permissions/$MODULE-$VERSION
fi
+
+ return 2
}

No commit comments for this range

Something went wrong with that request. Please try again.