Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37718756
en ru br
Репозитории ALT
5.1: 2.4.27-alt11
4.1: 2.4.27-alt11
4.0: 2.4.27-alt10
3.0: 2.4.27-alt4
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: modutils

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: modutils-2.4.2-rh-prepost.patch
Скачать


--- modutils-2.4.2/util/alias.h.prepost	Tue Mar  6 18:24:18 2001
+++ modutils-2.4.2/util/alias.h	Wed Mar  7 12:35:40 2001
@@ -227,6 +227,28 @@
 };
 
 /*
+ * This is the list of pre-defined "post-install"s,
+ * used to execute commands after loading modules.
+ * /etc/modules.conf can add entries but not remove them.
+ */
+char *post_install[] =
+{
+	"binfmt_misc /bin/mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc >/dev/null 2>&1 ||:",
+	NULL 
+};
+
+/*
+ * This is the list of pre-defined "pre-remove"s,
+ * used to execute commands before unloading modules.
+ * /etc/modules.conf can add entries but not remove them.
+ */
+char *pre_remove[] =
+{
+	"binfmt_misc /bin/umount /proc/sys/fs/binfmt_misc >/dev/null 2>&1 ||:",
+	NULL
+};
+
+/*
  * This is the list of pre-defined "prune"s,
  * used to exclude paths from scan of /lib/modules.
  * /etc/modules.conf can add entries but not remove them.
--- modutils-2.4.2/util/config.c.prepost	Thu Jan  4 20:45:19 2001
+++ modutils-2.4.2/util/config.c	Tue Mar  6 18:24:18 2001
@@ -691,6 +691,20 @@
 		 */
 		if (all && aliaslist[0])
 			n_aliases = build_list(aliaslist, &aliases, version, 0);
+		
+		/*
+		 * Build predef postinstalls
+		 */
+		if (all && post_install[0])
+			for (i=0 ; post_install[i] ; i++ )
+				decode_exec(xstrdup(post_install[i]), EXEC_POST_INSTALL);
+		
+		/*
+		 * Build predef preremoves
+		 */
+		if (all && pre_remove[0])
+			for (i=0 ; pre_remove[i] ; i++ )
+				decode_exec(xstrdup(pre_remove[i]), EXEC_PRE_REMOVE);
 
 		/* Order and priority is now: (MODPATH + modules.conf) || (predefs + modules.conf) */
 		if ((envpath = getenv("MODPATH")) != NULL && !safemode) {
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin