nixpkgs/pkgs/by-name/hi/hibernate/hibernate.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

38 lines
1.5 KiB
Diff

--- hibernate-script-1.98.1/hibernate.sh 2008-03-31 09:40:29.000000000 +0200
+++ hibernate-script-1.98.1/hibernate.sh 2008-04-01 18:24:23.000000000 +0200
@@ -224,7 +224,7 @@ FindXServer() {
xauth="`get_env_var_of_process $xpid XAUTHORITY`"
xhome="`get_env_var_of_process $xpid HOME`"
- xuser=`/bin/ls -ld /proc/$xpid/ | awk '{print $3}'`
+ xuser=`ls -ld /proc/$xpid/ | awk '{print $3}'`
[ -z $xauth ] && [ -n $xhome ] && [ -f $xhome/.Xauthority ] && xauth=$xhome/.Xauthority
[ -z $xauth ] && continue
@@ -273,14 +273,14 @@ UsingSuspendMethod() {
# chain.
SortSuspendBits() {
# explicit path required to be ash compatible.
- /bin/echo -ne "$SUSPEND_BITS" | sort -n
+ echo -ne "$SUSPEND_BITS" | sort -n
}
# SortResumeBits: Returns a list of functions registered in the correct order
# to call for resuming, prefixed by their position number.
SortResumeBits() {
# explicit path required to be ash compatible.
- /bin/echo -ne "$RESUME_BITS" | sort -rn
+ echo -ne "$RESUME_BITS" | sort -rn
}
# WrapHelpText: takes text from stdin, wraps it with an indent of 5 and width
@@ -557,7 +557,7 @@ LoadScriptlets() {
CURRENT_SOURCED_SCRIPTLET=""
for scriptlet_dir in $SCRIPTLET_PATH ; do
[ -d "$scriptlet_dir" ] || continue
- [ -z "`/bin/ls -1 $scriptlet_dir`" ] && continue
+ [ -z "`ls -1 $scriptlet_dir`" ] && continue
for scriptlet in $scriptlet_dir/* ; do
# Avoid editor backup files.
case "$scriptlet" in *~|*.bak) continue ;; esac