Author: blino
Date: Thu Feb 1 18:00:40 2007
New Revision: 115831
Modified:
packages/cooker/915resolution/current/SOURCES/915resolution.suspend
packages/cooker/915resolution/current/SPECS/915resolution.spec
Log:
write a pm-utils hook out of the suspend-scripts hook (#28508)
Modified: packages/cooker/915resolution/current/SOURCES/915resolution.suspend
==============================================================================
--- packages/cooker/915resolution/current/SOURCES/915resolution.suspend
(original)
+++ packages/cooker/915resolution/current/SOURCES/915resolution.suspend Thu Feb
1 18:00:40 2007
@@ -1,29 +1,15 @@
-#!/bin/bash
-# -*- Mode: shell-script -*-
-# Copyright (C) 2003-2006 by Mandriva
-# Author: Colin Guthrie
-# Redistribution of this file is permitted under the terms of the GNU
-# Public License (GPL)
-#
-# suspend: 50
-# resume: 5
+#!/bin/sh
-. /etc/sysconfig/suspend
+. /etc/pm/functions
-ARG=$1
-MOD=$2
-
-function resume {
- if [ "$MOD" = "s4" ]; then
- if [ -f /var/lock/subsys/915resolution ]; then
- /sbin/service 915resolution restart
- fi
- fi
-}
-
-case $ARG in
- resume)
- resume
- ;;
+case "$1" in
+ thaw)
+ if [ -f /var/lock/subsys/915resolution ]; then
+ /sbin/service 915resolution restart
+ fi
+ ;;
+ *)
+ ;;
esac
+exit $?
Modified: packages/cooker/915resolution/current/SPECS/915resolution.spec
==============================================================================
--- packages/cooker/915resolution/current/SPECS/915resolution.spec
(original)
+++ packages/cooker/915resolution/current/SPECS/915resolution.spec Thu Feb
1 18:00:40 2007
@@ -1,6 +1,7 @@
%define name 915resolution
%define version 0.5.2
-%define release %mkrel 7
+%define release %mkrel 8
+%define suspend_level 21
Summary: A tool to force resolution of Intel 9xx video Card
Name: %{name}
@@ -52,9 +53,7 @@
install -D -m0755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%name
install -D -m0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%name
-install -m 755 -d %buildroot%_sysconfdir/sysconfig/suspend-scripts/suspend.d
-
-install -m 755 %{SOURCE3}
%buildroot%_sysconfdir/sysconfig/suspend-scripts/suspend.d/%{name}
+install -D -m 755 %{SOURCE3}
%{buildroot}%{_sysconfdir}/pm/hooks/%{suspend_level}_%{name}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -71,5 +70,5 @@
%doc chipset_info.txt README.txt
%_sbindir/%name
/etc/rc.d/init.d/%{name}
-%_sysconfdir/sysconfig/suspend-scripts/suspend.d/%{name}
+%{_sysconfdir}/pm/hooks/%{suspend_level}_%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/*