├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── Makefile.am ├── Makefile.in ├── NEWS ├── README ├── aclocal.m4 ├── autogen.sh ├── compile ├── config.guess ├── config.h.in ├── config.sub ├── configure ├── configure.ac ├── depcomp ├── distros └── debian │ ├── README-DEBIAN │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── docs │ ├── install │ ├── menu │ ├── postinst │ ├── postrm │ ├── rules │ ├── source │ └── format │ └── watch ├── etc ├── Makefile.am ├── Makefile.in ├── systemd │ ├── README │ ├── devmon │ └── devmon@.service └── udevil.conf ├── install ├── install-sh ├── intltool-extract.in ├── intltool-merge.in ├── intltool-update.in ├── ltmain.sh ├── man ├── Makefile.am ├── Makefile.in └── udevil.1 ├── missing ├── mkinstalldirs ├── po ├── ChangeLog ├── LINGUAS ├── Makefile.in.in ├── POTFILES.in ├── de.po ├── es.po ├── fr.po ├── it.po ├── pl.po ├── pt_BR.po ├── ru.po ├── sv.po ├── udevil.pot └── update-pot ├── src ├── Makefile.am ├── Makefile.in ├── canonicalize.c ├── canonicalize.h ├── device-info.c ├── device-info.h ├── devmon └── udevil.c └── stamp-h1 /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.tar.gz 3 | *.gmo 4 | *.o 5 | *.a 6 | 7 | src/udevil 8 | src/.deps/ 9 | src/.libs/ 10 | 11 | autom4te.cache/ 12 | Makefile 13 | config.log 14 | config.status 15 | libtool 16 | config.h 17 | 18 | po/.intltool-merge-cache 19 | po/POTFILES 20 | po/*.gmo 21 | po/stamp-it 22 | po/Makefile.in 23 | 24 | packages/*/*.src.tar.gz 25 | packages/*/*.changes 26 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Developer: IgnorantGuru 2 | 3 | Contributor: OmegaPhil 4 | 5 | Source code taken from other projects: 6 | * spacefm (udev support) 7 | * util-linux (secure canonicalize) 8 | * pmount-jjk (remove device code - modified) 9 | * udisks 1.0.4 (device info functions - modified) 10 | * pmount 0.99 (physical tty test function - modified) 11 | 12 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 0.4.4 2015-05-04: 2 | udevil.conf new default/allowed options for exfat #52 3 | [devmon 1.1.8] fix no error popup on --unmount-removable #42 4 | [devmon 1.1.8] improve --exec-on-unmount for mounted during startup 5 | [devmon 1.1.8] unset %d %l for --exec-on-unmount #56 6 | special handling for cifs mount ipv6 literal #46; retain literal host 7 | udevil.conf allowed_options_ftpfs remove ip=*; add ip= after test #46 8 | respect configure option --sysconfdir #31 #53 9 | udisks2 compatibility: replace /run/media/$USER with /media/$USER #47 10 | no setfacl udisks2 fallback compat user:root 0700 on /media/$USER #47 11 | support git-style /** suffix for some udevil.conf patterns #37 12 | 0.4.3 2013-12-09: 13 | fix default udevil.conf allowed_options missing fmask=0133 #35 14 | 0.4.2 2013-12-04: 15 | move packages to pkg branch 16 | debian pkgs libudev0 | libudev1 17 | update translations; add es fr pl sv 18 | fix building with automake-1.13 19 | autogen.sh ensure pot not deleted 20 | improve denied 94 msg #24 21 | default fmask=0133 for vfat ntfs msdos umsdos #25 22 | [devmon 1.1.7] support raid /dev/mda in partition detection #28 23 | fix identify empty optical drive 24 | [devmon 1.1.7] add option --enumerate-device-files #26 25 | 0.4.1 2013-03-17: 26 | update Russian translation 27 | added translation files to transifex.com 28 | added Italian translation by Matteo Bernardini 29 | added partial German translation by Delix 30 | add update-pot script 31 | clear -Werror=format-security warnings 32 | [devmon 1.1.6] handle hyphen in device node name 33 | updated German; added pt_BR Portuguese (Brazil) 34 | 0.4.0 2013-02-11: 35 | debian package add XXXXXXXX to mktemp template [dist] 36 | [devmon 1.1.5] get pmount mount point after mount #20 37 | move debian/ to distros/debian/ and update README 38 | fix -t with net fstype without protocol 39 | create /run on demand 40 | added WebDAV davfs2 support (http:// https://) 41 | 0.3.6 2012-12-16: 42 | file mount prevent race conditions 43 | disallow remount of file due to potential race conditions 44 | systemd service file set DISPLAY for popups #17 45 | 0.3.5 2012-11-24: 46 | ftpfs limit attempts on none #14 47 | handle mount point trailing space #12 48 | update russian translation 49 | default udevil.conf add file to allowed_types 50 | 0.3.4 2012-10-21: 51 | btrfs moint point detection workaround - spacefm issue 165 52 | adjustment for build on debian squeeze 53 | install devmon systemd service files (or --disable-systemd) #10 54 | [devmon 1.1.4] use spacefm or zenity for popup dialogs 55 | 0.3.3 2012-09-14: 56 | update ru.po 57 | no quote cifs password 58 | allow most UTF-8 characters in options 59 | default udevil.conf add utf8 to default_options_iso9660,ntfs,vfat 60 | 0.3.2 2012-08-15: 61 | accept smb workgroup/user 62 | curlftpfs pass user:pass as option 63 | allow email address as username 64 | allow unmount ejected disc #6 #7 65 | [devmon 1.1.3] unmount ejected disc; clean unmounted #6 #7 66 | [devmon 1.1.3] less verbose which 67 | no default ro for udf in udevil.conf 68 | 0.3.1 2012-07-25: 69 | cifs,smbfs use guest option when no user specified 70 | sshfs add port as option 71 | added default_options_ntfs to udevil.conf 72 | [devmon 1.1.2] udevil clean on remove device #6 73 | sshfs supplies current user if none specified 74 | cifs no user specified try guest mount then current user 75 | ready for translations - see TRANSLATE 76 | translation independent msg numbers in errors, warnings, and denied msgs 77 | test forbidden file consistently 78 | Russian translation by Vladimir Kudrya 79 | 0.3.0 2012-07-13: 80 | cifs,ftpfs dont quote username, double quote password #3 81 | default udevil.conf: allow option flush 82 | net mount point name inc dir #4 83 | 0.2.9 2012-06-29: 84 | fixed POTFILES.in to correct build deb problem #2 85 | users can mount/umount tmpfs and ramfs if in allowed_types; updated conf 86 | conf allow option sync for nfs; remove noatime,utf8 for smbfs/cifs #3 87 | change mount usage for parted magic mtab issue 88 | 0.2.8 2012-06-15: 89 | ssh:// support 90 | use cifs by default instead of smbfs 91 | fix denied when passing mount option uid= on command line 92 | updated default udevil.conf 93 | 0.2.7 2012-06-04: 94 | try u/mount as current user early; clean all mount points on unmount 95 | 0.2.6 2012-06-03: 96 | replace realpath.c with canonicalize.c 97 | 0.2.5 2012-05-30: 98 | correct make check error in po (affects debian build package) 99 | correct debian postinst error 100 | 0.2.4 2012-05-28: 101 | allow unmount removed devices 102 | [devmon 1.1.1] unmount removed devices if mounted 103 | mounted messages to stdout instead of stderr 104 | [devmon 1.1.1] use pmount ahead of udisks; test executables 105 | do not log read default config location 106 | udevil.conf: iso9660 & udf add ro to prevent mount read-only warning 107 | 0.2.3 2012-05-27: 108 | create /run/media/$USER on demand; add configure --with-setfacl-prog 109 | corrected Arch Linux udevil-git AUR package overwriting udevil.conf 110 | 0.2.2 2012-05-26: 111 | build with large file support for stat64 files >2GB on 32 bit fixes #1 112 | accept relative arguments on command line 113 | 0.2.1 2012-05-25: 114 | log error msgs when parsing network url 115 | added devmon 1.1.0 automounting script to udevil distribution 116 | 0.2.0 2012-05-22: 117 | initial test release 118 | 119 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation Instructions 2 | ************************* 3 | 4 | Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, 5 | Inc. 6 | 7 | Copying and distribution of this file, with or without modification, 8 | are permitted in any medium without royalty provided the copyright 9 | notice and this notice are preserved. This file is offered as-is, 10 | without warranty of any kind. 11 | 12 | Basic Installation 13 | ================== 14 | 15 | Briefly, the shell command `./configure && make && make install' 16 | should configure, build, and install this package. The following 17 | more-detailed instructions are generic; see the `README' file for 18 | instructions specific to this package. Some packages provide this 19 | `INSTALL' file but do not implement all of the features documented 20 | below. The lack of an optional feature in a given package is not 21 | necessarily a bug. More recommendations for GNU packages can be found 22 | in *note Makefile Conventions: (standards)Makefile Conventions. 23 | 24 | The `configure' shell script attempts to guess correct values for 25 | various system-dependent variables used during compilation. It uses 26 | those values to create a `Makefile' in each directory of the package. 27 | It may also create one or more `.h' files containing system-dependent 28 | definitions. Finally, it creates a shell script `config.status' that 29 | you can run in the future to recreate the current configuration, and a 30 | file `config.log' containing compiler output (useful mainly for 31 | debugging `configure'). 32 | 33 | It can also use an optional file (typically called `config.cache' 34 | and enabled with `--cache-file=config.cache' or simply `-C') that saves 35 | the results of its tests to speed up reconfiguring. Caching is 36 | disabled by default to prevent problems with accidental use of stale 37 | cache files. 38 | 39 | If you need to do unusual things to compile the package, please try 40 | to figure out how `configure' could check whether to do them, and mail 41 | diffs or instructions to the address given in the `README' so they can 42 | be considered for the next release. If you are using the cache, and at 43 | some point `config.cache' contains results you don't want to keep, you 44 | may remove or edit it. 45 | 46 | The file `configure.ac' (or `configure.in') is used to create 47 | `configure' by a program called `autoconf'. You need `configure.ac' if 48 | you want to change it or regenerate `configure' using a newer version 49 | of `autoconf'. 50 | 51 | The simplest way to compile this package is: 52 | 53 | 1. `cd' to the directory containing the package's source code and type 54 | `./configure' to configure the package for your system. 55 | 56 | Running `configure' might take a while. While running, it prints 57 | some messages telling which features it is checking for. 58 | 59 | 2. Type `make' to compile the package. 60 | 61 | 3. Optionally, type `make check' to run any self-tests that come with 62 | the package, generally using the just-built uninstalled binaries. 63 | 64 | 4. Type `make install' to install the programs and any data files and 65 | documentation. When installing into a prefix owned by root, it is 66 | recommended that the package be configured and built as a regular 67 | user, and only the `make install' phase executed with root 68 | privileges. 69 | 70 | 5. Optionally, type `make installcheck' to repeat any self-tests, but 71 | this time using the binaries in their final installed location. 72 | This target does not install anything. Running this target as a 73 | regular user, particularly if the prior `make install' required 74 | root privileges, verifies that the installation completed 75 | correctly. 76 | 77 | 6. You can remove the program binaries and object files from the 78 | source code directory by typing `make clean'. To also remove the 79 | files that `configure' created (so you can compile the package for 80 | a different kind of computer), type `make distclean'. There is 81 | also a `make maintainer-clean' target, but that is intended mainly 82 | for the package's developers. If you use it, you may have to get 83 | all sorts of other programs in order to regenerate files that came 84 | with the distribution. 85 | 86 | 7. Often, you can also type `make uninstall' to remove the installed 87 | files again. In practice, not all packages have tested that 88 | uninstallation works correctly, even though it is required by the 89 | GNU Coding Standards. 90 | 91 | 8. Some packages, particularly those that use Automake, provide `make 92 | distcheck', which can by used by developers to test that all other 93 | targets like `make install' and `make uninstall' work correctly. 94 | This target is generally not run by end users. 95 | 96 | Compilers and Options 97 | ===================== 98 | 99 | Some systems require unusual options for compilation or linking that 100 | the `configure' script does not know about. Run `./configure --help' 101 | for details on some of the pertinent environment variables. 102 | 103 | You can give `configure' initial values for configuration parameters 104 | by setting variables in the command line or in the environment. Here 105 | is an example: 106 | 107 | ./configure CC=c99 CFLAGS=-g LIBS=-lposix 108 | 109 | *Note Defining Variables::, for more details. 110 | 111 | Compiling For Multiple Architectures 112 | ==================================== 113 | 114 | You can compile the package for more than one kind of computer at the 115 | same time, by placing the object files for each architecture in their 116 | own directory. To do this, you can use GNU `make'. `cd' to the 117 | directory where you want the object files and executables to go and run 118 | the `configure' script. `configure' automatically checks for the 119 | source code in the directory that `configure' is in and in `..'. This 120 | is known as a "VPATH" build. 121 | 122 | With a non-GNU `make', it is safer to compile the package for one 123 | architecture at a time in the source code directory. After you have 124 | installed the package for one architecture, use `make distclean' before 125 | reconfiguring for another architecture. 126 | 127 | On MacOS X 10.5 and later systems, you can create libraries and 128 | executables that work on multiple system types--known as "fat" or 129 | "universal" binaries--by specifying multiple `-arch' options to the 130 | compiler but only a single `-arch' option to the preprocessor. Like 131 | this: 132 | 133 | ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 134 | CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ 135 | CPP="gcc -E" CXXCPP="g++ -E" 136 | 137 | This is not guaranteed to produce working output in all cases, you 138 | may have to build one architecture at a time and combine the results 139 | using the `lipo' tool if you have problems. 140 | 141 | Installation Names 142 | ================== 143 | 144 | By default, `make install' installs the package's commands under 145 | `/usr/local/bin', include files under `/usr/local/include', etc. You 146 | can specify an installation prefix other than `/usr/local' by giving 147 | `configure' the option `--prefix=PREFIX', where PREFIX must be an 148 | absolute file name. 149 | 150 | You can specify separate installation prefixes for 151 | architecture-specific files and architecture-independent files. If you 152 | pass the option `--exec-prefix=PREFIX' to `configure', the package uses 153 | PREFIX as the prefix for installing programs and libraries. 154 | Documentation and other data files still use the regular prefix. 155 | 156 | In addition, if you use an unusual directory layout you can give 157 | options like `--bindir=DIR' to specify different values for particular 158 | kinds of files. Run `configure --help' for a list of the directories 159 | you can set and what kinds of files go in them. In general, the 160 | default for these options is expressed in terms of `${prefix}', so that 161 | specifying just `--prefix' will affect all of the other directory 162 | specifications that were not explicitly provided. 163 | 164 | The most portable way to affect installation locations is to pass the 165 | correct locations to `configure'; however, many packages provide one or 166 | both of the following shortcuts of passing variable assignments to the 167 | `make install' command line to change installation locations without 168 | having to reconfigure or recompile. 169 | 170 | The first method involves providing an override variable for each 171 | affected directory. For example, `make install 172 | prefix=/alternate/directory' will choose an alternate location for all 173 | directory configuration variables that were expressed in terms of 174 | `${prefix}'. Any directories that were specified during `configure', 175 | but not in terms of `${prefix}', must each be overridden at install 176 | time for the entire installation to be relocated. The approach of 177 | makefile variable overrides for each directory variable is required by 178 | the GNU Coding Standards, and ideally causes no recompilation. 179 | However, some platforms have known limitations with the semantics of 180 | shared libraries that end up requiring recompilation when using this 181 | method, particularly noticeable in packages that use GNU Libtool. 182 | 183 | The second method involves providing the `DESTDIR' variable. For 184 | example, `make install DESTDIR=/alternate/directory' will prepend 185 | `/alternate/directory' before all installation names. The approach of 186 | `DESTDIR' overrides is not required by the GNU Coding Standards, and 187 | does not work on platforms that have drive letters. On the other hand, 188 | it does better at avoiding recompilation issues, and works well even 189 | when some directory options were not specified in terms of `${prefix}' 190 | at `configure' time. 191 | 192 | Optional Features 193 | ================= 194 | 195 | If the package supports it, you can cause programs to be installed 196 | with an extra prefix or suffix on their names by giving `configure' the 197 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. 198 | 199 | Some packages pay attention to `--enable-FEATURE' options to 200 | `configure', where FEATURE indicates an optional part of the package. 201 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE 202 | is something like `gnu-as' or `x' (for the X Window System). The 203 | `README' should mention any `--enable-' and `--with-' options that the 204 | package recognizes. 205 | 206 | For packages that use the X Window System, `configure' can usually 207 | find the X include and library files automatically, but if it doesn't, 208 | you can use the `configure' options `--x-includes=DIR' and 209 | `--x-libraries=DIR' to specify their locations. 210 | 211 | Some packages offer the ability to configure how verbose the 212 | execution of `make' will be. For these packages, running `./configure 213 | --enable-silent-rules' sets the default to minimal output, which can be 214 | overridden with `make V=1'; while running `./configure 215 | --disable-silent-rules' sets the default to verbose, which can be 216 | overridden with `make V=0'. 217 | 218 | Particular systems 219 | ================== 220 | 221 | On HP-UX, the default C compiler is not ANSI C compatible. If GNU 222 | CC is not installed, it is recommended to use the following options in 223 | order to use an ANSI C compiler: 224 | 225 | ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" 226 | 227 | and if that doesn't work, install pre-built binaries of GCC for HP-UX. 228 | 229 | HP-UX `make' updates targets which have the same time stamps as 230 | their prerequisites, which makes it generally unusable when shipped 231 | generated files such as `configure' are involved. Use GNU `make' 232 | instead. 233 | 234 | On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot 235 | parse its `' header file. The option `-nodtk' can be used as 236 | a workaround. If GNU CC is not installed, it is therefore recommended 237 | to try 238 | 239 | ./configure CC="cc" 240 | 241 | and if that doesn't work, try 242 | 243 | ./configure CC="cc -nodtk" 244 | 245 | On Solaris, don't put `/usr/ucb' early in your `PATH'. This 246 | directory contains several dysfunctional programs; working variants of 247 | these programs are available in `/usr/bin'. So, if you need `/usr/ucb' 248 | in your `PATH', put it _after_ `/usr/bin'. 249 | 250 | On Haiku, software installed for all users goes in `/boot/common', 251 | not `/usr/local'. It is recommended to use the following options: 252 | 253 | ./configure --prefix=/boot/common 254 | 255 | Specifying the System Type 256 | ========================== 257 | 258 | There may be some features `configure' cannot figure out 259 | automatically, but needs to determine by the type of machine the package 260 | will run on. Usually, assuming the package is built to be run on the 261 | _same_ architectures, `configure' can figure that out, but if it prints 262 | a message saying it cannot guess the machine type, give it the 263 | `--build=TYPE' option. TYPE can either be a short name for the system 264 | type, such as `sun4', or a canonical name which has the form: 265 | 266 | CPU-COMPANY-SYSTEM 267 | 268 | where SYSTEM can have one of these forms: 269 | 270 | OS 271 | KERNEL-OS 272 | 273 | See the file `config.sub' for the possible values of each field. If 274 | `config.sub' isn't included in this package, then this package doesn't 275 | need to know the machine type. 276 | 277 | If you are _building_ compiler tools for cross-compiling, you should 278 | use the option `--target=TYPE' to select the type of system they will 279 | produce code for. 280 | 281 | If you want to _use_ a cross compiler, that generates code for a 282 | platform different from the build platform, you should specify the 283 | "host" platform (i.e., that on which the generated programs will 284 | eventually be run) with `--host=TYPE'. 285 | 286 | Sharing Defaults 287 | ================ 288 | 289 | If you want to set default values for `configure' scripts to share, 290 | you can create a site shell script called `config.site' that gives 291 | default values for variables like `CC', `cache_file', and `prefix'. 292 | `configure' looks for `PREFIX/share/config.site' if it exists, then 293 | `PREFIX/etc/config.site' if it exists. Or, you can set the 294 | `CONFIG_SITE' environment variable to the location of the site script. 295 | A warning: not all `configure' scripts look for a site script. 296 | 297 | Defining Variables 298 | ================== 299 | 300 | Variables not defined in a site shell script can be set in the 301 | environment passed to `configure'. However, some packages may run 302 | configure again during the build, and the customized values of these 303 | variables may be lost. In order to avoid this problem, you should set 304 | them in the `configure' command line, using `VAR=value'. For example: 305 | 306 | ./configure CC=/usr/local2/bin/gcc 307 | 308 | causes the specified `gcc' to be used as the C compiler (unless it is 309 | overridden in the site shell script). 310 | 311 | Unfortunately, this technique does not work for `CONFIG_SHELL' due to 312 | an Autoconf limitation. Until the limitation is lifted, you can use 313 | this workaround: 314 | 315 | CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 316 | 317 | `configure' Invocation 318 | ====================== 319 | 320 | `configure' recognizes the following options to control how it 321 | operates. 322 | 323 | `--help' 324 | `-h' 325 | Print a summary of all of the options to `configure', and exit. 326 | 327 | `--help=short' 328 | `--help=recursive' 329 | Print a summary of the options unique to this package's 330 | `configure', and exit. The `short' variant lists options used 331 | only in the top level, while the `recursive' variant lists options 332 | also present in any nested packages. 333 | 334 | `--version' 335 | `-V' 336 | Print the version of Autoconf used to generate the `configure' 337 | script, and exit. 338 | 339 | `--cache-file=FILE' 340 | Enable the cache: use and save the results of the tests in FILE, 341 | traditionally `config.cache'. FILE defaults to `/dev/null' to 342 | disable caching. 343 | 344 | `--config-cache' 345 | `-C' 346 | Alias for `--cache-file=config.cache'. 347 | 348 | `--quiet' 349 | `--silent' 350 | `-q' 351 | Do not print messages saying which checks are being made. To 352 | suppress all normal output, redirect it to `/dev/null' (any error 353 | messages will still be shown). 354 | 355 | `--srcdir=DIR' 356 | Look for the package's source code in directory DIR. Usually 357 | `configure' can determine that directory automatically. 358 | 359 | `--prefix=DIR' 360 | Use DIR as the installation prefix. *note Installation Names:: 361 | for more details, including other options available for fine-tuning 362 | the installation locations. 363 | 364 | `--no-create' 365 | `-n' 366 | Run the configure checks, but stop before creating any output 367 | files. 368 | 369 | `configure' also accepts some other, not widely useful, options. Run 370 | `configure --help' for more details. 371 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = etc po src 2 | 3 | EXTRA_DIST = \ 4 | intltool-extract.in \ 5 | intltool-update.in \ 6 | intltool-merge.in 7 | 8 | CLEANFILES = \ 9 | intltool-extract \ 10 | intltool-update \ 11 | intltool-merge 12 | 13 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IgnorantGuru/udevil/ce9f1c5f811e34913b050aed193a39a63ac81e73/NEWS -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | README for udevil v0.4.4 2 | 3 | 4 | Homepage: 5 | http://ignorantguru.github.io/udevil/ 6 | 7 | Downloads: 8 | https://github.com/IgnorantGuru/udevil/tree/pkg 9 | 10 | Official Forum (for udevil & SpaceFM): 11 | https://sourceforge.net/p/spacefm/discussion/general/ 12 | 13 | 14 | CONTENTS 15 | 16 | DESCRIPTION 17 | PACKAGES 18 | INSTALLER 19 | BUILD 20 | BUILD NEXT 21 | CREATE DEB PACKAGE 22 | POST INSTALL 23 | Kernel Polling 24 | Networks and Files 25 | NTFS-3G 26 | Set SUID 27 | systemd Service 28 | ENABLE KERNEL POLLING 29 | UNINSTALL 30 | TRANSLATE 31 | LICENSE 32 | 33 | 34 | DESCRIPTION 35 | 36 | Mounts and unmounts removable devices and networks without a password (set 37 | suid), shows device info, monitors device changes. Emulates mount's and 38 | udisks's command line usage and udisks v1's output. Includes the devmon 39 | automounting daemon. 40 | 41 | Run 'udevil --help' for usage. See /etc/udevil/udevil.conf for config. 42 | http://ignorantguru.github.com/udevil/udevil--help.html 43 | http://ignorantguru.github.com/udevil/udevil.conf.txt 44 | 45 | 46 | PACKAGES 47 | 48 | Find or add packages, forum threads, and other info for your distro: 49 | https://github.com/IgnorantGuru/spacefm/wiki/Distros 50 | 51 | For other distros: 52 | See INSTALLER below 53 | 54 | NOTE: See POST INSTALL section below for post-installation steps. 55 | 56 | 57 | INSTALLER 58 | 59 | A self-extracting installer is available (udevil-x.x.x-installer.sh): 60 | https://github.com/IgnorantGuru/udevil/tree/pkg 61 | (To save a file, click on its filename and click 'View Raw') 62 | 63 | The installer requires the build dependencies listed below in BUILD. If 64 | any dependencies are missing, examine the error, install missing packages, 65 | and try again. 66 | 67 | The installer MUST be run in a terminal. It automatically builds and 68 | installs. Run it like this: 69 | 70 | bash udevil-x.x.x-installer.sh 71 | 72 | or to see options: 73 | 74 | bash udevil-x.x.x-installer.sh --help 75 | 76 | To reinstall or upgrade, just run the latest installer again. 77 | 78 | NOTE: See POST INSTALL section below for post-installation steps. 79 | 80 | 81 | BUILD 82 | 83 | 1) Install required build dependencies (below are Debian package names - 84 | packages names on your distro may vary but should be similar): 85 | 86 | libglib2.0-0 libglib2.0-dev libudev0 (>=143) libudev-dev 87 | autotools-dev build-essential fakeroot intltool pkg-config 88 | 89 | Also recommended for network support: cifs-utils curlftpfs sshfs 90 | 91 | Also recommended if using devmon: eject spacefm|zenity 92 | 93 | configure will report anything missing when you run it as shown below. 94 | 95 | 2) Use these commands to download the udevil tarball and build: 96 | 97 | # Download & Extract 98 | mkdir /tmp/udevil-build && cd /tmp/udevil-build 99 | wget -O udevil.tar.gz https://github.com/IgnorantGuru/udevil/tarball/master 100 | tar xzf udevil.tar.gz 101 | cd IgnorantGuru-udevil-* 102 | 103 | # Build & Install 104 | ./configure --prefix=/usr 105 | make 106 | sudo make install 107 | 108 | # Remove Temporary Files 109 | cd / && rm -rf /tmp/udevil-build 110 | 111 | NOTES: 112 | 113 | * If configure reports missing dependencies, install them and run 114 | configure again before proceeding to make. 115 | 116 | * By default, systemd configuration files for devmon are installed to: 117 | /etc/conf.d/devmon 118 | /usr/lib/systemd/system/devmon@.service 119 | To skip installation of these files, use configure option 120 | --disable-systemd In either case, systemd is NOT required. 121 | 122 | * See POST INSTALL section below for post-installation steps. 123 | 124 | 125 | BUILD NEXT 126 | 127 | The git 'next' branch of udevil is a work in progress which eventually 128 | becomes the next release version. To build from this branch, install the 129 | required build dependencies listed above in BUILD, then: 130 | 131 | # Download & Extract 132 | mkdir /tmp/udevil-next && cd /tmp/udevil-next 133 | wget -O udevil-next.tar.gz https://github.com/IgnorantGuru/udevil/tarball/next 134 | tar xzf udevil-next.tar.gz 135 | cd IgnorantGuru-udevil-* 136 | 137 | # Build, & Install 138 | ./configure --prefix=/usr 139 | make 140 | sudo make install 141 | 142 | # Remove Temporary Files 143 | cd / && rm -rf /tmp/udevil-next 144 | 145 | 146 | CREATE DEB PACKAGE 147 | 148 | To build a deb file of udevil on your Debian-based distro: 149 | 150 | 1) Install build dependencies (see BUILD section above) plus 'debhelper'. 151 | 152 | 2) Use these commands to download and extract the udevil tarball (be sure 153 | to USE A TMP BUILD PATH THAT DOES NOT CONTAIN SPACES): 154 | 155 | mkdir /tmp/udevil-build && cd /tmp/udevil-build # no spaces in path 156 | # Note: you can change "master" to "next" if you want the next branch: 157 | wget -O udevil.tar.gz https://github.com/IgnorantGuru/udevil/tarball/master 158 | tar xzf udevil.tar.gz 159 | cd IgnorantGuru-udevil-* 160 | 161 | 3) Move the distros/debian directory into the source directory: 162 | 163 | mv distros/debian . 164 | 165 | 4) Build package: (the package files will appear in the parent directory) 166 | 167 | dpkg-buildpackage -b -uc 168 | cd .. && rm -rf IgnorantGuru-udevil-* udevil.tar.gz 169 | 170 | 5) To install the package you built: 171 | 172 | dpkg -i udevil*.deb 173 | 174 | 175 | POST INSTALL 176 | 177 | Kernel Polling 178 | -------------- 179 | 180 | You may need to enable kernel polling for device media to be detected by 181 | udevil. See ENABLE KERNEL POLLING section below. 182 | 183 | 184 | Networks and Files 185 | ------------------ 186 | 187 | By default, /etc/udevil/udevil.conf is set to allow only local fileystems 188 | and ISO files to be mounted, with mounting of networks disallowed. To 189 | allow networks and files to be mounted, in /etc/udevil/udevil.conf set: 190 | 191 | allowed_types = $KNOWN_FILESYSTEMS, file, cifs, nfs, curlftpfs, sshfs, davfs 192 | 193 | You may also need to install curlftpfs or ftpfs (ftp://), cifs or smbfs 194 | (smb://), sshfs (ssh://), and davfs2 (http://). 195 | 196 | 197 | NTFS-3G 198 | ------- 199 | 200 | If local ntfs filesystems aren't mounted writable, you may need to 201 | configure your system to mount ntfs with ntfs-3g (on some distros this is 202 | already done). For example: 203 | 204 | sudo ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs 205 | 206 | # OR if mount.ntfs-3g is located in /usr/bin: 207 | sudo ln -s /usr/bin/mount.ntfs-3g /usr/bin/mount.ntfs 208 | 209 | 210 | Set SUID 211 | -------- 212 | 213 | After installing udevil, /usr/bin/udevil should have the suid bit already 214 | set. If not, set it like this: 215 | 216 | sudo chown root:root /usr/bin/udevil 217 | sudo chmod u+s,go-s,ugo+x /usr/bin/udevil 218 | ls -l /usr/bin/udevil 219 | -rwsr-xr-x 1 root root 226625 May 22 08:13 /usr/bin/udevil 220 | 221 | OR, to restrict execution of udevil to the 'plugdev' group only: 222 | 223 | sudo chown root:plugdev /usr/bin/udevil 224 | sudo chmod u+s,go-s,o-x /usr/bin/udevil 225 | ls -l /usr/bin/udevil 226 | -rwsr-xr-- 1 root plugdev 226625 May 22 08:13 /usr/bin/udevil 227 | 228 | OR, if you don't want to use udevil for mounting, you can unset suid: 229 | sudo chown root:root /usr/bin/udevil 230 | sudo chmod ugo-s,ugo+x /usr/bin/udevil 231 | ls -l /usr/bin/udevil 232 | -rwxr-xr-x 1 root root 226625 May 22 08:13 /usr/bin/udevil 233 | 234 | You can also limit users and groups by editing /etc/udevil/udevil.conf 235 | 236 | 237 | systemd Service 238 | --------------- 239 | 240 | To start devmon as a systemd service: 241 | systemctl start devmon@ 242 | 243 | 244 | ENABLE KERNEL POLLING 245 | 246 | You may need to enable kernel polling for device media to be detected by 247 | udevil. For example, if you insert a CD and udevil's monitor command 248 | doesn't report a change to the device, or udevil doesn't see a filesystem 249 | on the device, this is a symptom that kernel polling is not enabled. 250 | 251 | Kernel polling is a newer feature of the Linux kernel and udev, so some 252 | distros don't yet have it enabled by default. To use kernel polling, 253 | your Linux kernel may need to be 2.6.38 or newer, and udev may need to 254 | be version 173 or newer. 255 | 256 | TO DETERMINE IF KERNEL POLLING IS ENABLED: 257 | 258 | cat /sys/module/block/parameters/events_dfl_poll_msecs 259 | cat /sys/block/sr0/events_poll_msecs 260 | 261 | If you get 0 or -1 from both of those commands, kernel polling may be 262 | disabled. 263 | 264 | TO ENABLE KERNEL POLLING PERMANENTLY (survives a reboot), add the 265 | following command to your /etc/rc.local file (anywhere before the 266 | 'exit' line in that file): 267 | 268 | echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs 269 | 270 | Any number between 2000 and 5000 (milliseconds) should be reasonable - 271 | the higher 5000 means poll every 5 seconds, which is less overhead but 272 | a little slower. 273 | 274 | OR pass this option to the kernel boot command line in grub: 275 | 276 | block.events_dfl_poll_msecs=2000 277 | 278 | OR add a udev rule to enable kernel polling on removable devices: 279 | 280 | echo 'ACTION=="add", ATTR{removable}=="1", \ 281 | ATTR{events_poll_msecs}=="-1", ATTR{events_poll_msecs}="2000"' \ 282 | > /etc/udev/rules.d/61-removable-storage-polling.rules 283 | 284 | A reboot will be required for the above changes to take effect, or... 285 | 286 | TO ENABLE KERNEL POLLING TEMPORARILY AND IMMEDIATELY, enable common 287 | polling for the block module: 288 | 289 | sudo bash -c 'echo 2000 > /sys/module/block/parameters/events_dfl_poll_msecs' 290 | 291 | OR you can enable polling just for a single device like this (/dev/sr0 292 | in this example): 293 | 294 | sudo bash -c 'echo 2000 > /sys/block/sr0/events_poll_msecs' 295 | 296 | This change should be immediate - media will be detected. However, the 297 | above change will be lost when you reboot. 298 | 299 | References: 300 | http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg15714.html 301 | http://blogs.gentoo.org/mgorny/2011/06/20/uam-can-now-mount-cds-and-dvds/ 302 | https://bugs.archlinux.org/task/25609 303 | http://unix.stackexchange.com/questions/38582/ 304 | 305 | 306 | UNINSTALL 307 | 308 | If you installed from a package, use your package manager to remove udevil. 309 | Otherwise, extract the tarball and enter the directory containing 310 | configure: 311 | 312 | # first run configure with your original options if needed: 313 | ./configure 314 | sudo make uninstall 315 | # Note: /etc/udevil/ is not automatically removed 316 | 317 | 318 | TRANSLATE 319 | 320 | To help translate udevil please visit: 321 | https://github.com/IgnorantGuru/spacefm/wiki/Translate 322 | 323 | At Transifex: 324 | https://www.transifex.com/projects/p/udevil/ 325 | 326 | Just sign up for a free Transifex account. For instructions visit: 327 | http://help.transifex.com/intro/translating.html#translating 328 | 329 | 330 | LICENSE 331 | 332 | udevil - Copyright (C) 2015 GPL3+ 333 | 334 | This program is free software; you can redistribute it and/or modify it 335 | under the terms of the GNU General Public License as published by the 336 | Free Software Foundation; either version 3 of the License, or (at your 337 | option) any later version. 338 | 339 | USE AT YOUR OWN RISK. This program is distributed in the hope that it 340 | will be useful, but WITHOUT ANY WARRANTY; without even the implied 341 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 342 | the GNU General Public License for more details. 343 | 344 | You should have received a copy of the GNU General Public License along 345 | with this program; if not, write to the Free Software Foundation, Inc., 346 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 347 | 348 | See COPYING file. 349 | 350 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run this to generate all the initial makefiles, etc. 3 | 4 | srcdir=`dirname $0` 5 | test -z "$srcdir" && srcdir=. 6 | 7 | ORIGDIR=`pwd` 8 | cd $srcdir 9 | PROJECT=udevil 10 | TEST_TYPE=-f 11 | FILE=src/udevil.c 12 | 13 | DIE=0 14 | 15 | (autoconf --version) < /dev/null > /dev/null 2>&1 || { 16 | echo 17 | echo "You must have autoconf installed to compile $PROJECT." 18 | echo "Download the appropriate package for your distribution," 19 | echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" 20 | DIE=1 21 | } 22 | 23 | AUTOMAKE=automake-1.9 24 | ACLOCAL=aclocal-1.9 25 | INTLTOOLIZE=intltoolize-0.40 26 | 27 | ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { 28 | AUTOMAKE=automake 29 | ACLOCAL=aclocal 30 | INTLTOOLIZE=intltoolize 31 | } 32 | 33 | ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || { 34 | echo 35 | echo "You must have automake installed to compile $PROJECT." 36 | echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.9.tar.gz" 37 | echo "(or a newer version if it is available)" 38 | DIE=1 39 | } 40 | 41 | ($INTLTOOLIZE --version) < /dev/null > /dev/null 2>&1 || { 42 | echo 43 | echo "You must have intltool installed to compile $PROJECT." 44 | echo "Get http://freshmeat.net/urls/1aa3b96c7f49a6e49fb2a10b722bba39" 45 | echo "(or a newer version if it is available)" 46 | DIE=1 47 | } 48 | 49 | (grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null) && { 50 | (libtool --version) < /dev/null > /dev/null 2>&1 || { 51 | echo 52 | echo "**Error**: You must have \`libtool' installed to compile $PROJECT." 53 | echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" 54 | echo "(or a newer version if it is available)" 55 | DIE=1 56 | } 57 | } 58 | 59 | grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null && { 60 | grep "sed.*POTFILES" $srcdir/configure.ac >/dev/null || \ 61 | (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { 62 | echo 63 | echo "**Error**: You must have \`glib' installed to compile $PROJECT." 64 | DIE=1 65 | } 66 | } 67 | 68 | if test "$DIE" -eq 1; then 69 | exit 1 70 | fi 71 | 72 | test $TEST_TYPE $FILE || { 73 | echo "You must run this script in the top-level $PROJECT directory" 74 | exit 1 75 | } 76 | 77 | if test -z "$*"; then 78 | echo "I am going to run ./configure with no arguments - if you wish " 79 | echo "to pass any to it, please specify them on the $0 command line." 80 | fi 81 | 82 | case $CC in 83 | *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;; 84 | esac 85 | 86 | for coin in `find $srcdir -name configure.ac -print` 87 | do 88 | dr=`dirname $coin` 89 | if test -f $dr/NO-AUTO-GEN; then 90 | echo skipping $dr -- flagged as no auto-gen 91 | else 92 | echo processing $dr 93 | macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin` 94 | ( cd $dr 95 | aclocalinclude="$ACLOCAL_FLAGS" 96 | for k in $macrodirs; do 97 | if test -d $k; then 98 | aclocalinclude="$aclocalinclude -I $k" 99 | ##else 100 | ## echo "**Warning**: No such directory \`$k'. Ignored." 101 | fi 102 | done 103 | if grep "^AM_GNU_GETTEXT" configure.ac >/dev/null; then 104 | if grep "sed.*POTFILES" configure.ac >/dev/null; then 105 | : do nothing -- we still have an old unmodified configure.ac 106 | else 107 | echo "Creating $dr/aclocal.m4 ..." 108 | test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 109 | echo "Running gettextize... Ignore non-fatal messages." 110 | echo "no" | gettextize --force --copy 111 | echo "Making $dr/aclocal.m4 writable ..." 112 | test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 113 | fi 114 | fi 115 | if grep "^AM_GNOME_GETTEXT" configure.ac >/dev/null; then 116 | echo "Creating $dr/aclocal.m4 ..." 117 | test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 118 | echo "Running gettextize... Ignore non-fatal messages." 119 | echo "no" | gettextize --force --copy 120 | echo "Making $dr/aclocal.m4 writable ..." 121 | test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 122 | fi 123 | if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then 124 | echo "Creating $dr/aclocal.m4 ..." 125 | test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 126 | echo "Running gettextize... Ignore non-fatal messages." 127 | echo "no" | glib-gettextize --force --copy 128 | echo "Making $dr/aclocal.m4 writable ..." 129 | test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 130 | fi 131 | if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then 132 | echo "Running intltoolize..." 133 | intltoolize --copy --force --automake 134 | fi 135 | if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then 136 | echo "Running libtoolize..." 137 | libtoolize --force --copy 138 | fi 139 | echo "Running $ACLOCAL $aclocalinclude ..." 140 | $ACLOCAL $aclocalinclude 141 | if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then 142 | echo "Running autoheader..." 143 | autoheader 144 | fi 145 | echo "Running $AUTOMAKE --gnu $am_opt ..." 146 | $AUTOMAKE --add-missing --gnu $am_opt 147 | echo "Running autoconf ..." 148 | autoconf 149 | ) 150 | fi 151 | done 152 | 153 | conf_flags="--enable-maintainer-mode " #--enable-compile-warnings" #--enable-iso-c 154 | 155 | # ensure pot file is not deleted by make clean 156 | sed -i 's/\(.*rm -f.*\)\$(GETTEXT_PACKAGE)\.pot \(.*\)/\1 \2/' po/Makefile.in.in 157 | 158 | cd "$ORIGDIR" 159 | 160 | if test x$NOCONFIGURE = x; then 161 | echo Running $srcdir/configure $conf_flags "$@" ... 162 | $srcdir/configure $conf_flags "$@" \ 163 | && echo "Now type \`make\' to compile $PROJECT" || exit 1 164 | else 165 | echo Skipping configure process. 166 | fi 167 | -------------------------------------------------------------------------------- /compile: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Wrapper for compilers which do not understand '-c -o'. 3 | 4 | scriptversion=2012-10-14.11; # UTC 5 | 6 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. 7 | # Written by Tom Tromey . 8 | # 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | # 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | # 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | # This file is maintained in Automake, please report 28 | # bugs to or send patches to 29 | # . 30 | 31 | nl=' 32 | ' 33 | 34 | # We need space, tab and new line, in precisely that order. Quoting is 35 | # there to prevent tools from complaining about whitespace usage. 36 | IFS=" "" $nl" 37 | 38 | file_conv= 39 | 40 | # func_file_conv build_file lazy 41 | # Convert a $build file to $host form and store it in $file 42 | # Currently only supports Windows hosts. If the determined conversion 43 | # type is listed in (the comma separated) LAZY, no conversion will 44 | # take place. 45 | func_file_conv () 46 | { 47 | file=$1 48 | case $file in 49 | / | /[!/]*) # absolute file, and not a UNC file 50 | if test -z "$file_conv"; then 51 | # lazily determine how to convert abs files 52 | case `uname -s` in 53 | MINGW*) 54 | file_conv=mingw 55 | ;; 56 | CYGWIN*) 57 | file_conv=cygwin 58 | ;; 59 | *) 60 | file_conv=wine 61 | ;; 62 | esac 63 | fi 64 | case $file_conv/,$2, in 65 | *,$file_conv,*) 66 | ;; 67 | mingw/*) 68 | file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` 69 | ;; 70 | cygwin/*) 71 | file=`cygpath -m "$file" || echo "$file"` 72 | ;; 73 | wine/*) 74 | file=`winepath -w "$file" || echo "$file"` 75 | ;; 76 | esac 77 | ;; 78 | esac 79 | } 80 | 81 | # func_cl_dashL linkdir 82 | # Make cl look for libraries in LINKDIR 83 | func_cl_dashL () 84 | { 85 | func_file_conv "$1" 86 | if test -z "$lib_path"; then 87 | lib_path=$file 88 | else 89 | lib_path="$lib_path;$file" 90 | fi 91 | linker_opts="$linker_opts -LIBPATH:$file" 92 | } 93 | 94 | # func_cl_dashl library 95 | # Do a library search-path lookup for cl 96 | func_cl_dashl () 97 | { 98 | lib=$1 99 | found=no 100 | save_IFS=$IFS 101 | IFS=';' 102 | for dir in $lib_path $LIB 103 | do 104 | IFS=$save_IFS 105 | if $shared && test -f "$dir/$lib.dll.lib"; then 106 | found=yes 107 | lib=$dir/$lib.dll.lib 108 | break 109 | fi 110 | if test -f "$dir/$lib.lib"; then 111 | found=yes 112 | lib=$dir/$lib.lib 113 | break 114 | fi 115 | if test -f "$dir/lib$lib.a"; then 116 | found=yes 117 | lib=$dir/lib$lib.a 118 | break 119 | fi 120 | done 121 | IFS=$save_IFS 122 | 123 | if test "$found" != yes; then 124 | lib=$lib.lib 125 | fi 126 | } 127 | 128 | # func_cl_wrapper cl arg... 129 | # Adjust compile command to suit cl 130 | func_cl_wrapper () 131 | { 132 | # Assume a capable shell 133 | lib_path= 134 | shared=: 135 | linker_opts= 136 | for arg 137 | do 138 | if test -n "$eat"; then 139 | eat= 140 | else 141 | case $1 in 142 | -o) 143 | # configure might choose to run compile as 'compile cc -o foo foo.c'. 144 | eat=1 145 | case $2 in 146 | *.o | *.[oO][bB][jJ]) 147 | func_file_conv "$2" 148 | set x "$@" -Fo"$file" 149 | shift 150 | ;; 151 | *) 152 | func_file_conv "$2" 153 | set x "$@" -Fe"$file" 154 | shift 155 | ;; 156 | esac 157 | ;; 158 | -I) 159 | eat=1 160 | func_file_conv "$2" mingw 161 | set x "$@" -I"$file" 162 | shift 163 | ;; 164 | -I*) 165 | func_file_conv "${1#-I}" mingw 166 | set x "$@" -I"$file" 167 | shift 168 | ;; 169 | -l) 170 | eat=1 171 | func_cl_dashl "$2" 172 | set x "$@" "$lib" 173 | shift 174 | ;; 175 | -l*) 176 | func_cl_dashl "${1#-l}" 177 | set x "$@" "$lib" 178 | shift 179 | ;; 180 | -L) 181 | eat=1 182 | func_cl_dashL "$2" 183 | ;; 184 | -L*) 185 | func_cl_dashL "${1#-L}" 186 | ;; 187 | -static) 188 | shared=false 189 | ;; 190 | -Wl,*) 191 | arg=${1#-Wl,} 192 | save_ifs="$IFS"; IFS=',' 193 | for flag in $arg; do 194 | IFS="$save_ifs" 195 | linker_opts="$linker_opts $flag" 196 | done 197 | IFS="$save_ifs" 198 | ;; 199 | -Xlinker) 200 | eat=1 201 | linker_opts="$linker_opts $2" 202 | ;; 203 | -*) 204 | set x "$@" "$1" 205 | shift 206 | ;; 207 | *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) 208 | func_file_conv "$1" 209 | set x "$@" -Tp"$file" 210 | shift 211 | ;; 212 | *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) 213 | func_file_conv "$1" mingw 214 | set x "$@" "$file" 215 | shift 216 | ;; 217 | *) 218 | set x "$@" "$1" 219 | shift 220 | ;; 221 | esac 222 | fi 223 | shift 224 | done 225 | if test -n "$linker_opts"; then 226 | linker_opts="-link$linker_opts" 227 | fi 228 | exec "$@" $linker_opts 229 | exit 1 230 | } 231 | 232 | eat= 233 | 234 | case $1 in 235 | '') 236 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 237 | exit 1; 238 | ;; 239 | -h | --h*) 240 | cat <<\EOF 241 | Usage: compile [--help] [--version] PROGRAM [ARGS] 242 | 243 | Wrapper for compilers which do not understand '-c -o'. 244 | Remove '-o dest.o' from ARGS, run PROGRAM with the remaining 245 | arguments, and rename the output as expected. 246 | 247 | If you are trying to build a whole package this is not the 248 | right script to run: please start by reading the file 'INSTALL'. 249 | 250 | Report bugs to . 251 | EOF 252 | exit $? 253 | ;; 254 | -v | --v*) 255 | echo "compile $scriptversion" 256 | exit $? 257 | ;; 258 | cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) 259 | func_cl_wrapper "$@" # Doesn't return... 260 | ;; 261 | esac 262 | 263 | ofile= 264 | cfile= 265 | 266 | for arg 267 | do 268 | if test -n "$eat"; then 269 | eat= 270 | else 271 | case $1 in 272 | -o) 273 | # configure might choose to run compile as 'compile cc -o foo foo.c'. 274 | # So we strip '-o arg' only if arg is an object. 275 | eat=1 276 | case $2 in 277 | *.o | *.obj) 278 | ofile=$2 279 | ;; 280 | *) 281 | set x "$@" -o "$2" 282 | shift 283 | ;; 284 | esac 285 | ;; 286 | *.c) 287 | cfile=$1 288 | set x "$@" "$1" 289 | shift 290 | ;; 291 | *) 292 | set x "$@" "$1" 293 | shift 294 | ;; 295 | esac 296 | fi 297 | shift 298 | done 299 | 300 | if test -z "$ofile" || test -z "$cfile"; then 301 | # If no '-o' option was seen then we might have been invoked from a 302 | # pattern rule where we don't need one. That is ok -- this is a 303 | # normal compilation that the losing compiler can handle. If no 304 | # '.c' file was seen then we are probably linking. That is also 305 | # ok. 306 | exec "$@" 307 | fi 308 | 309 | # Name of file we expect compiler to create. 310 | cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` 311 | 312 | # Create the lock directory. 313 | # Note: use '[/\\:.-]' here to ensure that we don't use the same name 314 | # that we are using for the .o file. Also, base the name on the expected 315 | # object file name, since that is what matters with a parallel build. 316 | lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d 317 | while true; do 318 | if mkdir "$lockdir" >/dev/null 2>&1; then 319 | break 320 | fi 321 | sleep 1 322 | done 323 | # FIXME: race condition here if user kills between mkdir and trap. 324 | trap "rmdir '$lockdir'; exit 1" 1 2 15 325 | 326 | # Run the compile. 327 | "$@" 328 | ret=$? 329 | 330 | if test -f "$cofile"; then 331 | test "$cofile" = "$ofile" || mv "$cofile" "$ofile" 332 | elif test -f "${cofile}bj"; then 333 | test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" 334 | fi 335 | 336 | rmdir "$lockdir" 337 | exit $ret 338 | 339 | # Local Variables: 340 | # mode: shell-script 341 | # sh-indentation: 2 342 | # eval: (add-hook 'write-file-hooks 'time-stamp) 343 | # time-stamp-start: "scriptversion=" 344 | # time-stamp-format: "%:y-%02m-%02d.%02H" 345 | # time-stamp-time-zone: "UTC" 346 | # time-stamp-end: "; # UTC" 347 | # End: 348 | -------------------------------------------------------------------------------- /config.h.in: -------------------------------------------------------------------------------- 1 | /* config.h.in. Generated from configure.ac by autoheader. */ 2 | 3 | /* Copy devmon daemon systemd files */ 4 | #undef ADD_SYSTEMD 5 | 6 | /* always defined to indicate that i18n is enabled */ 7 | #undef ENABLE_NLS 8 | 9 | /* Gettext package */ 10 | #undef GETTEXT_PACKAGE 11 | 12 | /* Define to 1 if you have the `bind_textdomain_codeset' function. */ 13 | #undef HAVE_BIND_TEXTDOMAIN_CODESET 14 | 15 | /* Define to 1 if you have the `dcgettext' function. */ 16 | #undef HAVE_DCGETTEXT 17 | 18 | /* Define to 1 if you have the header file. */ 19 | #undef HAVE_DLFCN_H 20 | 21 | /* Define if the GNU gettext() function is already present or preinstalled. */ 22 | #undef HAVE_GETTEXT 23 | 24 | /* Define to 1 if you have the header file. */ 25 | #undef HAVE_INTTYPES_H 26 | 27 | /* Define if your file defines LC_MESSAGES. */ 28 | #undef HAVE_LC_MESSAGES 29 | 30 | /* Define to 1 if you have the header file. */ 31 | #undef HAVE_LOCALE_H 32 | 33 | /* Define to 1 if you have the header file. */ 34 | #undef HAVE_MEMORY_H 35 | 36 | /* Define to 1 if you have the header file. */ 37 | #undef HAVE_STDINT_H 38 | 39 | /* Define to 1 if you have the header file. */ 40 | #undef HAVE_STDLIB_H 41 | 42 | /* Define to 1 if you have the header file. */ 43 | #undef HAVE_STRINGS_H 44 | 45 | /* Define to 1 if you have the header file. */ 46 | #undef HAVE_STRING_H 47 | 48 | /* Define to 1 if you have the header file. */ 49 | #undef HAVE_SYS_STAT_H 50 | 51 | /* Define to 1 if you have the header file. */ 52 | #undef HAVE_SYS_TYPES_H 53 | 54 | /* Define to 1 if you have the header file. */ 55 | #undef HAVE_UNISTD_H 56 | 57 | /* path to losetup */ 58 | #undef LOSETUPPROG 59 | 60 | /* Define to the sub-directory in which libtool stores uninstalled libraries. 61 | */ 62 | #undef LT_OBJDIR 63 | 64 | /* path to mount */ 65 | #undef MOUNTPROG 66 | 67 | /* Name of package */ 68 | #undef PACKAGE 69 | 70 | /* Define to the address where bug reports for this package should be sent. */ 71 | #undef PACKAGE_BUGREPORT 72 | 73 | /* Define to the full name of this package. */ 74 | #undef PACKAGE_NAME 75 | 76 | /* Define to the full name and version of this package. */ 77 | #undef PACKAGE_STRING 78 | 79 | /* Define to the one symbol short name of this package. */ 80 | #undef PACKAGE_TARNAME 81 | 82 | /* Define to the home page for this package. */ 83 | #undef PACKAGE_URL 84 | 85 | /* Define to the version of this package. */ 86 | #undef PACKAGE_VERSION 87 | 88 | /* path to setfacl */ 89 | #undef SETFACLPROG 90 | 91 | /* Define to 1 if you have the ANSI C header files. */ 92 | #undef STDC_HEADERS 93 | 94 | /* udevil version */ 95 | #undef UDEVIL_VERSION 96 | 97 | /* path to umount */ 98 | #undef UMOUNTPROG 99 | 100 | /* Version number of package */ 101 | #undef VERSION 102 | 103 | /* File offset bits */ 104 | #undef _FILE_OFFSET_BITS 105 | 106 | /* Whether to enable large file support */ 107 | #undef _LARGEFILE64_SOURCE 108 | 109 | /* Whether to enable large file support */ 110 | #undef _LARGEFILE_SOURCE 111 | -------------------------------------------------------------------------------- /configure.ac: -------------------------------------------------------------------------------- 1 | AC_PREREQ(2.52) 2 | 3 | AC_INIT(src/udevil.c) 4 | AC_CONFIG_HEADERS(config.h) 5 | AC_CONFIG_SRCDIR(src) 6 | AM_INIT_AUTOMAKE(udevil, 0.4.4) 7 | 8 | AC_PROG_INTLTOOL([0.21]) 9 | 10 | AM_MAINTAINER_MODE 11 | AC_ISC_POSIX 12 | AM_PROG_CC_C_O 13 | AC_HEADER_STDC 14 | AM_PROG_LIBTOOL 15 | AC_PROG_INSTALL 16 | 17 | AC_DEFINE_UNQUOTED(UDEVIL_VERSION, "$VERSION", [udevil version]) 18 | 19 | # sysconfdir defaults to /usr/local/etc if this is not done: 20 | test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc 21 | 22 | dnl linker optimizations 23 | AC_MSG_CHECKING([whether $LD accepts --as-needed]) 24 | case `$LD --as-needed -v 2>&1 &1 &1 = 143], , [ 111 | AC_MSG_RESULT(no) 112 | AC_MSG_ERROR([ 113 | 114 | You must install libudev development headers (eg libudev-dev) to build. 115 | 116 | If you have these installed already you may need to install pkg-config so 117 | I can find them. 118 | ])]) 119 | AC_SUBST(LIBUDEV_CFLAGS) 120 | AC_SUBST(LIBUDEV_LIBS) 121 | 122 | 123 | #dnl Large file support 124 | CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -D_FILE_OFFSET_BITS=64" 125 | AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support]) 126 | AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits]) 127 | AC_DEFINE(_LARGEFILE_SOURCE, 1, [Whether to enable large file support]) 128 | 129 | 130 | GETTEXT_PACKAGE="udevil" 131 | AC_SUBST(GETTEXT_PACKAGE) 132 | AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext package]) 133 | 134 | dnl Add the languages which your application supports here. 135 | #ALL_LINGUAS="af ar da ca cs de es et eu fa fi fr gl he hr hu id it ja ko lt ml ms nb nl nn pl ps pt pt_BR ru sk sl sv tr uk ur ur_PK vi zh_CN zh_TW" 136 | ALL_LINGUAS="ru" 137 | AM_GLIB_GNU_GETTEXT 138 | 139 | 140 | AC_OUTPUT([ 141 | Makefile 142 | po/Makefile.in 143 | man/Makefile 144 | etc/Makefile 145 | src/Makefile 146 | ]) 147 | 148 | 149 | echo 150 | echo udevil....................................... : Version $VERSION 151 | echo 152 | echo Linux device support......................... : libudev 153 | if test x"$mountprog" != x""; then 154 | echo mount program................................ : $mountprog 155 | else 156 | echo mount program................................ : /bin/mount 157 | fi 158 | if test x"$umountprog" != x""; then 159 | echo umount program............................... : $umountprog 160 | else 161 | echo umount program............................... : /bin/umount 162 | fi 163 | if test x"$losetupprog" != x""; then 164 | echo losetup program.............................. : $losetupprog 165 | else 166 | echo losetup program.............................. : /sbin/losetup 167 | fi 168 | if test x"$setfaclprog" != x""; then 169 | echo setfacl program.............................. : $setfaclprog 170 | else 171 | echo setfacl program.............................. : /usr/bin/setfacl 172 | fi 173 | echo Install devmon systemd service files ?....... : $use_systemd 174 | echo Installation Prefix.......................... : $prefix 175 | echo " The binary will be installed as $prefix/bin/udevil" 176 | echo sysconfdir................................... : $sysconfdir 177 | echo " The configuration will be installed in $sysconfdir/udevil" 178 | echo 179 | echo 'Homepage: http://ignorantguru.github.io/udevil/' 180 | echo 181 | 182 | -------------------------------------------------------------------------------- /depcomp: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # depcomp - compile a program generating dependencies as side-effects 3 | 4 | scriptversion=2013-05-30.07; # UTC 5 | 6 | # Copyright (C) 1999-2013 Free Software Foundation, Inc. 7 | 8 | # This program is free software; you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation; either version 2, or (at your option) 11 | # any later version. 12 | 13 | # This program is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | 18 | # You should have received a copy of the GNU General Public License 19 | # along with this program. If not, see . 20 | 21 | # As a special exception to the GNU General Public License, if you 22 | # distribute this file as part of a program that contains a 23 | # configuration script generated by Autoconf, you may include it under 24 | # the same distribution terms that you use for the rest of that program. 25 | 26 | # Originally written by Alexandre Oliva . 27 | 28 | case $1 in 29 | '') 30 | echo "$0: No command. Try '$0 --help' for more information." 1>&2 31 | exit 1; 32 | ;; 33 | -h | --h*) 34 | cat <<\EOF 35 | Usage: depcomp [--help] [--version] PROGRAM [ARGS] 36 | 37 | Run PROGRAMS ARGS to compile a file, generating dependencies 38 | as side-effects. 39 | 40 | Environment variables: 41 | depmode Dependency tracking mode. 42 | source Source file read by 'PROGRAMS ARGS'. 43 | object Object file output by 'PROGRAMS ARGS'. 44 | DEPDIR directory where to store dependencies. 45 | depfile Dependency file to output. 46 | tmpdepfile Temporary file to use when outputting dependencies. 47 | libtool Whether libtool is used (yes/no). 48 | 49 | Report bugs to . 50 | EOF 51 | exit $? 52 | ;; 53 | -v | --v*) 54 | echo "depcomp $scriptversion" 55 | exit $? 56 | ;; 57 | esac 58 | 59 | # Get the directory component of the given path, and save it in the 60 | # global variables '$dir'. Note that this directory component will 61 | # be either empty or ending with a '/' character. This is deliberate. 62 | set_dir_from () 63 | { 64 | case $1 in 65 | */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; 66 | *) dir=;; 67 | esac 68 | } 69 | 70 | # Get the suffix-stripped basename of the given path, and save it the 71 | # global variable '$base'. 72 | set_base_from () 73 | { 74 | base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` 75 | } 76 | 77 | # If no dependency file was actually created by the compiler invocation, 78 | # we still have to create a dummy depfile, to avoid errors with the 79 | # Makefile "include basename.Plo" scheme. 80 | make_dummy_depfile () 81 | { 82 | echo "#dummy" > "$depfile" 83 | } 84 | 85 | # Factor out some common post-processing of the generated depfile. 86 | # Requires the auxiliary global variable '$tmpdepfile' to be set. 87 | aix_post_process_depfile () 88 | { 89 | # If the compiler actually managed to produce a dependency file, 90 | # post-process it. 91 | if test -f "$tmpdepfile"; then 92 | # Each line is of the form 'foo.o: dependency.h'. 93 | # Do two passes, one to just change these to 94 | # $object: dependency.h 95 | # and one to simply output 96 | # dependency.h: 97 | # which is needed to avoid the deleted-header problem. 98 | { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" 99 | sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" 100 | } > "$depfile" 101 | rm -f "$tmpdepfile" 102 | else 103 | make_dummy_depfile 104 | fi 105 | } 106 | 107 | # A tabulation character. 108 | tab=' ' 109 | # A newline character. 110 | nl=' 111 | ' 112 | # Character ranges might be problematic outside the C locale. 113 | # These definitions help. 114 | upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ 115 | lower=abcdefghijklmnopqrstuvwxyz 116 | digits=0123456789 117 | alpha=${upper}${lower} 118 | 119 | if test -z "$depmode" || test -z "$source" || test -z "$object"; then 120 | echo "depcomp: Variables source, object and depmode must be set" 1>&2 121 | exit 1 122 | fi 123 | 124 | # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. 125 | depfile=${depfile-`echo "$object" | 126 | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} 127 | tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} 128 | 129 | rm -f "$tmpdepfile" 130 | 131 | # Avoid interferences from the environment. 132 | gccflag= dashmflag= 133 | 134 | # Some modes work just like other modes, but use different flags. We 135 | # parameterize here, but still list the modes in the big case below, 136 | # to make depend.m4 easier to write. Note that we *cannot* use a case 137 | # here, because this file can only contain one case statement. 138 | if test "$depmode" = hp; then 139 | # HP compiler uses -M and no extra arg. 140 | gccflag=-M 141 | depmode=gcc 142 | fi 143 | 144 | if test "$depmode" = dashXmstdout; then 145 | # This is just like dashmstdout with a different argument. 146 | dashmflag=-xM 147 | depmode=dashmstdout 148 | fi 149 | 150 | cygpath_u="cygpath -u -f -" 151 | if test "$depmode" = msvcmsys; then 152 | # This is just like msvisualcpp but w/o cygpath translation. 153 | # Just convert the backslash-escaped backslashes to single forward 154 | # slashes to satisfy depend.m4 155 | cygpath_u='sed s,\\\\,/,g' 156 | depmode=msvisualcpp 157 | fi 158 | 159 | if test "$depmode" = msvc7msys; then 160 | # This is just like msvc7 but w/o cygpath translation. 161 | # Just convert the backslash-escaped backslashes to single forward 162 | # slashes to satisfy depend.m4 163 | cygpath_u='sed s,\\\\,/,g' 164 | depmode=msvc7 165 | fi 166 | 167 | if test "$depmode" = xlc; then 168 | # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. 169 | gccflag=-qmakedep=gcc,-MF 170 | depmode=gcc 171 | fi 172 | 173 | case "$depmode" in 174 | gcc3) 175 | ## gcc 3 implements dependency tracking that does exactly what 176 | ## we want. Yay! Note: for some reason libtool 1.4 doesn't like 177 | ## it if -MD -MP comes after the -MF stuff. Hmm. 178 | ## Unfortunately, FreeBSD c89 acceptance of flags depends upon 179 | ## the command line argument order; so add the flags where they 180 | ## appear in depend2.am. Note that the slowdown incurred here 181 | ## affects only configure: in makefiles, %FASTDEP% shortcuts this. 182 | for arg 183 | do 184 | case $arg in 185 | -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; 186 | *) set fnord "$@" "$arg" ;; 187 | esac 188 | shift # fnord 189 | shift # $arg 190 | done 191 | "$@" 192 | stat=$? 193 | if test $stat -ne 0; then 194 | rm -f "$tmpdepfile" 195 | exit $stat 196 | fi 197 | mv "$tmpdepfile" "$depfile" 198 | ;; 199 | 200 | gcc) 201 | ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. 202 | ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. 203 | ## (see the conditional assignment to $gccflag above). 204 | ## There are various ways to get dependency output from gcc. Here's 205 | ## why we pick this rather obscure method: 206 | ## - Don't want to use -MD because we'd like the dependencies to end 207 | ## up in a subdir. Having to rename by hand is ugly. 208 | ## (We might end up doing this anyway to support other compilers.) 209 | ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like 210 | ## -MM, not -M (despite what the docs say). Also, it might not be 211 | ## supported by the other compilers which use the 'gcc' depmode. 212 | ## - Using -M directly means running the compiler twice (even worse 213 | ## than renaming). 214 | if test -z "$gccflag"; then 215 | gccflag=-MD, 216 | fi 217 | "$@" -Wp,"$gccflag$tmpdepfile" 218 | stat=$? 219 | if test $stat -ne 0; then 220 | rm -f "$tmpdepfile" 221 | exit $stat 222 | fi 223 | rm -f "$depfile" 224 | echo "$object : \\" > "$depfile" 225 | # The second -e expression handles DOS-style file names with drive 226 | # letters. 227 | sed -e 's/^[^:]*: / /' \ 228 | -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" 229 | ## This next piece of magic avoids the "deleted header file" problem. 230 | ## The problem is that when a header file which appears in a .P file 231 | ## is deleted, the dependency causes make to die (because there is 232 | ## typically no way to rebuild the header). We avoid this by adding 233 | ## dummy dependencies for each header file. Too bad gcc doesn't do 234 | ## this for us directly. 235 | ## Some versions of gcc put a space before the ':'. On the theory 236 | ## that the space means something, we add a space to the output as 237 | ## well. hp depmode also adds that space, but also prefixes the VPATH 238 | ## to the object. Take care to not repeat it in the output. 239 | ## Some versions of the HPUX 10.20 sed can't process this invocation 240 | ## correctly. Breaking it into two sed invocations is a workaround. 241 | tr ' ' "$nl" < "$tmpdepfile" \ 242 | | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ 243 | | sed -e 's/$/ :/' >> "$depfile" 244 | rm -f "$tmpdepfile" 245 | ;; 246 | 247 | hp) 248 | # This case exists only to let depend.m4 do its work. It works by 249 | # looking at the text of this script. This case will never be run, 250 | # since it is checked for above. 251 | exit 1 252 | ;; 253 | 254 | sgi) 255 | if test "$libtool" = yes; then 256 | "$@" "-Wp,-MDupdate,$tmpdepfile" 257 | else 258 | "$@" -MDupdate "$tmpdepfile" 259 | fi 260 | stat=$? 261 | if test $stat -ne 0; then 262 | rm -f "$tmpdepfile" 263 | exit $stat 264 | fi 265 | rm -f "$depfile" 266 | 267 | if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files 268 | echo "$object : \\" > "$depfile" 269 | # Clip off the initial element (the dependent). Don't try to be 270 | # clever and replace this with sed code, as IRIX sed won't handle 271 | # lines with more than a fixed number of characters (4096 in 272 | # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; 273 | # the IRIX cc adds comments like '#:fec' to the end of the 274 | # dependency line. 275 | tr ' ' "$nl" < "$tmpdepfile" \ 276 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ 277 | | tr "$nl" ' ' >> "$depfile" 278 | echo >> "$depfile" 279 | # The second pass generates a dummy entry for each header file. 280 | tr ' ' "$nl" < "$tmpdepfile" \ 281 | | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ 282 | >> "$depfile" 283 | else 284 | make_dummy_depfile 285 | fi 286 | rm -f "$tmpdepfile" 287 | ;; 288 | 289 | xlc) 290 | # This case exists only to let depend.m4 do its work. It works by 291 | # looking at the text of this script. This case will never be run, 292 | # since it is checked for above. 293 | exit 1 294 | ;; 295 | 296 | aix) 297 | # The C for AIX Compiler uses -M and outputs the dependencies 298 | # in a .u file. In older versions, this file always lives in the 299 | # current directory. Also, the AIX compiler puts '$object:' at the 300 | # start of each line; $object doesn't have directory information. 301 | # Version 6 uses the directory in both cases. 302 | set_dir_from "$object" 303 | set_base_from "$object" 304 | if test "$libtool" = yes; then 305 | tmpdepfile1=$dir$base.u 306 | tmpdepfile2=$base.u 307 | tmpdepfile3=$dir.libs/$base.u 308 | "$@" -Wc,-M 309 | else 310 | tmpdepfile1=$dir$base.u 311 | tmpdepfile2=$dir$base.u 312 | tmpdepfile3=$dir$base.u 313 | "$@" -M 314 | fi 315 | stat=$? 316 | if test $stat -ne 0; then 317 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 318 | exit $stat 319 | fi 320 | 321 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 322 | do 323 | test -f "$tmpdepfile" && break 324 | done 325 | aix_post_process_depfile 326 | ;; 327 | 328 | tcc) 329 | # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 330 | # FIXME: That version still under development at the moment of writing. 331 | # Make that this statement remains true also for stable, released 332 | # versions. 333 | # It will wrap lines (doesn't matter whether long or short) with a 334 | # trailing '\', as in: 335 | # 336 | # foo.o : \ 337 | # foo.c \ 338 | # foo.h \ 339 | # 340 | # It will put a trailing '\' even on the last line, and will use leading 341 | # spaces rather than leading tabs (at least since its commit 0394caf7 342 | # "Emit spaces for -MD"). 343 | "$@" -MD -MF "$tmpdepfile" 344 | stat=$? 345 | if test $stat -ne 0; then 346 | rm -f "$tmpdepfile" 347 | exit $stat 348 | fi 349 | rm -f "$depfile" 350 | # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. 351 | # We have to change lines of the first kind to '$object: \'. 352 | sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" 353 | # And for each line of the second kind, we have to emit a 'dep.h:' 354 | # dummy dependency, to avoid the deleted-header problem. 355 | sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" 356 | rm -f "$tmpdepfile" 357 | ;; 358 | 359 | ## The order of this option in the case statement is important, since the 360 | ## shell code in configure will try each of these formats in the order 361 | ## listed in this file. A plain '-MD' option would be understood by many 362 | ## compilers, so we must ensure this comes after the gcc and icc options. 363 | pgcc) 364 | # Portland's C compiler understands '-MD'. 365 | # Will always output deps to 'file.d' where file is the root name of the 366 | # source file under compilation, even if file resides in a subdirectory. 367 | # The object file name does not affect the name of the '.d' file. 368 | # pgcc 10.2 will output 369 | # foo.o: sub/foo.c sub/foo.h 370 | # and will wrap long lines using '\' : 371 | # foo.o: sub/foo.c ... \ 372 | # sub/foo.h ... \ 373 | # ... 374 | set_dir_from "$object" 375 | # Use the source, not the object, to determine the base name, since 376 | # that's sadly what pgcc will do too. 377 | set_base_from "$source" 378 | tmpdepfile=$base.d 379 | 380 | # For projects that build the same source file twice into different object 381 | # files, the pgcc approach of using the *source* file root name can cause 382 | # problems in parallel builds. Use a locking strategy to avoid stomping on 383 | # the same $tmpdepfile. 384 | lockdir=$base.d-lock 385 | trap " 386 | echo '$0: caught signal, cleaning up...' >&2 387 | rmdir '$lockdir' 388 | exit 1 389 | " 1 2 13 15 390 | numtries=100 391 | i=$numtries 392 | while test $i -gt 0; do 393 | # mkdir is a portable test-and-set. 394 | if mkdir "$lockdir" 2>/dev/null; then 395 | # This process acquired the lock. 396 | "$@" -MD 397 | stat=$? 398 | # Release the lock. 399 | rmdir "$lockdir" 400 | break 401 | else 402 | # If the lock is being held by a different process, wait 403 | # until the winning process is done or we timeout. 404 | while test -d "$lockdir" && test $i -gt 0; do 405 | sleep 1 406 | i=`expr $i - 1` 407 | done 408 | fi 409 | i=`expr $i - 1` 410 | done 411 | trap - 1 2 13 15 412 | if test $i -le 0; then 413 | echo "$0: failed to acquire lock after $numtries attempts" >&2 414 | echo "$0: check lockdir '$lockdir'" >&2 415 | exit 1 416 | fi 417 | 418 | if test $stat -ne 0; then 419 | rm -f "$tmpdepfile" 420 | exit $stat 421 | fi 422 | rm -f "$depfile" 423 | # Each line is of the form `foo.o: dependent.h', 424 | # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. 425 | # Do two passes, one to just change these to 426 | # `$object: dependent.h' and one to simply `dependent.h:'. 427 | sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" 428 | # Some versions of the HPUX 10.20 sed can't process this invocation 429 | # correctly. Breaking it into two sed invocations is a workaround. 430 | sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ 431 | | sed -e 's/$/ :/' >> "$depfile" 432 | rm -f "$tmpdepfile" 433 | ;; 434 | 435 | hp2) 436 | # The "hp" stanza above does not work with aCC (C++) and HP's ia64 437 | # compilers, which have integrated preprocessors. The correct option 438 | # to use with these is +Maked; it writes dependencies to a file named 439 | # 'foo.d', which lands next to the object file, wherever that 440 | # happens to be. 441 | # Much of this is similar to the tru64 case; see comments there. 442 | set_dir_from "$object" 443 | set_base_from "$object" 444 | if test "$libtool" = yes; then 445 | tmpdepfile1=$dir$base.d 446 | tmpdepfile2=$dir.libs/$base.d 447 | "$@" -Wc,+Maked 448 | else 449 | tmpdepfile1=$dir$base.d 450 | tmpdepfile2=$dir$base.d 451 | "$@" +Maked 452 | fi 453 | stat=$? 454 | if test $stat -ne 0; then 455 | rm -f "$tmpdepfile1" "$tmpdepfile2" 456 | exit $stat 457 | fi 458 | 459 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" 460 | do 461 | test -f "$tmpdepfile" && break 462 | done 463 | if test -f "$tmpdepfile"; then 464 | sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" 465 | # Add 'dependent.h:' lines. 466 | sed -ne '2,${ 467 | s/^ *// 468 | s/ \\*$// 469 | s/$/:/ 470 | p 471 | }' "$tmpdepfile" >> "$depfile" 472 | else 473 | make_dummy_depfile 474 | fi 475 | rm -f "$tmpdepfile" "$tmpdepfile2" 476 | ;; 477 | 478 | tru64) 479 | # The Tru64 compiler uses -MD to generate dependencies as a side 480 | # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. 481 | # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put 482 | # dependencies in 'foo.d' instead, so we check for that too. 483 | # Subdirectories are respected. 484 | set_dir_from "$object" 485 | set_base_from "$object" 486 | 487 | if test "$libtool" = yes; then 488 | # Libtool generates 2 separate objects for the 2 libraries. These 489 | # two compilations output dependencies in $dir.libs/$base.o.d and 490 | # in $dir$base.o.d. We have to check for both files, because 491 | # one of the two compilations can be disabled. We should prefer 492 | # $dir$base.o.d over $dir.libs/$base.o.d because the latter is 493 | # automatically cleaned when .libs/ is deleted, while ignoring 494 | # the former would cause a distcleancheck panic. 495 | tmpdepfile1=$dir$base.o.d # libtool 1.5 496 | tmpdepfile2=$dir.libs/$base.o.d # Likewise. 497 | tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 498 | "$@" -Wc,-MD 499 | else 500 | tmpdepfile1=$dir$base.d 501 | tmpdepfile2=$dir$base.d 502 | tmpdepfile3=$dir$base.d 503 | "$@" -MD 504 | fi 505 | 506 | stat=$? 507 | if test $stat -ne 0; then 508 | rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 509 | exit $stat 510 | fi 511 | 512 | for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" 513 | do 514 | test -f "$tmpdepfile" && break 515 | done 516 | # Same post-processing that is required for AIX mode. 517 | aix_post_process_depfile 518 | ;; 519 | 520 | msvc7) 521 | if test "$libtool" = yes; then 522 | showIncludes=-Wc,-showIncludes 523 | else 524 | showIncludes=-showIncludes 525 | fi 526 | "$@" $showIncludes > "$tmpdepfile" 527 | stat=$? 528 | grep -v '^Note: including file: ' "$tmpdepfile" 529 | if test $stat -ne 0; then 530 | rm -f "$tmpdepfile" 531 | exit $stat 532 | fi 533 | rm -f "$depfile" 534 | echo "$object : \\" > "$depfile" 535 | # The first sed program below extracts the file names and escapes 536 | # backslashes for cygpath. The second sed program outputs the file 537 | # name when reading, but also accumulates all include files in the 538 | # hold buffer in order to output them again at the end. This only 539 | # works with sed implementations that can handle large buffers. 540 | sed < "$tmpdepfile" -n ' 541 | /^Note: including file: *\(.*\)/ { 542 | s//\1/ 543 | s/\\/\\\\/g 544 | p 545 | }' | $cygpath_u | sort -u | sed -n ' 546 | s/ /\\ /g 547 | s/\(.*\)/'"$tab"'\1 \\/p 548 | s/.\(.*\) \\/\1:/ 549 | H 550 | $ { 551 | s/.*/'"$tab"'/ 552 | G 553 | p 554 | }' >> "$depfile" 555 | echo >> "$depfile" # make sure the fragment doesn't end with a backslash 556 | rm -f "$tmpdepfile" 557 | ;; 558 | 559 | msvc7msys) 560 | # This case exists only to let depend.m4 do its work. It works by 561 | # looking at the text of this script. This case will never be run, 562 | # since it is checked for above. 563 | exit 1 564 | ;; 565 | 566 | #nosideeffect) 567 | # This comment above is used by automake to tell side-effect 568 | # dependency tracking mechanisms from slower ones. 569 | 570 | dashmstdout) 571 | # Important note: in order to support this mode, a compiler *must* 572 | # always write the preprocessed file to stdout, regardless of -o. 573 | "$@" || exit $? 574 | 575 | # Remove the call to Libtool. 576 | if test "$libtool" = yes; then 577 | while test "X$1" != 'X--mode=compile'; do 578 | shift 579 | done 580 | shift 581 | fi 582 | 583 | # Remove '-o $object'. 584 | IFS=" " 585 | for arg 586 | do 587 | case $arg in 588 | -o) 589 | shift 590 | ;; 591 | $object) 592 | shift 593 | ;; 594 | *) 595 | set fnord "$@" "$arg" 596 | shift # fnord 597 | shift # $arg 598 | ;; 599 | esac 600 | done 601 | 602 | test -z "$dashmflag" && dashmflag=-M 603 | # Require at least two characters before searching for ':' 604 | # in the target name. This is to cope with DOS-style filenames: 605 | # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. 606 | "$@" $dashmflag | 607 | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" 608 | rm -f "$depfile" 609 | cat < "$tmpdepfile" > "$depfile" 610 | # Some versions of the HPUX 10.20 sed can't process this sed invocation 611 | # correctly. Breaking it into two sed invocations is a workaround. 612 | tr ' ' "$nl" < "$tmpdepfile" \ 613 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ 614 | | sed -e 's/$/ :/' >> "$depfile" 615 | rm -f "$tmpdepfile" 616 | ;; 617 | 618 | dashXmstdout) 619 | # This case only exists to satisfy depend.m4. It is never actually 620 | # run, as this mode is specially recognized in the preamble. 621 | exit 1 622 | ;; 623 | 624 | makedepend) 625 | "$@" || exit $? 626 | # Remove any Libtool call 627 | if test "$libtool" = yes; then 628 | while test "X$1" != 'X--mode=compile'; do 629 | shift 630 | done 631 | shift 632 | fi 633 | # X makedepend 634 | shift 635 | cleared=no eat=no 636 | for arg 637 | do 638 | case $cleared in 639 | no) 640 | set ""; shift 641 | cleared=yes ;; 642 | esac 643 | if test $eat = yes; then 644 | eat=no 645 | continue 646 | fi 647 | case "$arg" in 648 | -D*|-I*) 649 | set fnord "$@" "$arg"; shift ;; 650 | # Strip any option that makedepend may not understand. Remove 651 | # the object too, otherwise makedepend will parse it as a source file. 652 | -arch) 653 | eat=yes ;; 654 | -*|$object) 655 | ;; 656 | *) 657 | set fnord "$@" "$arg"; shift ;; 658 | esac 659 | done 660 | obj_suffix=`echo "$object" | sed 's/^.*\././'` 661 | touch "$tmpdepfile" 662 | ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" 663 | rm -f "$depfile" 664 | # makedepend may prepend the VPATH from the source file name to the object. 665 | # No need to regex-escape $object, excess matching of '.' is harmless. 666 | sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" 667 | # Some versions of the HPUX 10.20 sed can't process the last invocation 668 | # correctly. Breaking it into two sed invocations is a workaround. 669 | sed '1,2d' "$tmpdepfile" \ 670 | | tr ' ' "$nl" \ 671 | | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ 672 | | sed -e 's/$/ :/' >> "$depfile" 673 | rm -f "$tmpdepfile" "$tmpdepfile".bak 674 | ;; 675 | 676 | cpp) 677 | # Important note: in order to support this mode, a compiler *must* 678 | # always write the preprocessed file to stdout. 679 | "$@" || exit $? 680 | 681 | # Remove the call to Libtool. 682 | if test "$libtool" = yes; then 683 | while test "X$1" != 'X--mode=compile'; do 684 | shift 685 | done 686 | shift 687 | fi 688 | 689 | # Remove '-o $object'. 690 | IFS=" " 691 | for arg 692 | do 693 | case $arg in 694 | -o) 695 | shift 696 | ;; 697 | $object) 698 | shift 699 | ;; 700 | *) 701 | set fnord "$@" "$arg" 702 | shift # fnord 703 | shift # $arg 704 | ;; 705 | esac 706 | done 707 | 708 | "$@" -E \ 709 | | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 710 | -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ 711 | | sed '$ s: \\$::' > "$tmpdepfile" 712 | rm -f "$depfile" 713 | echo "$object : \\" > "$depfile" 714 | cat < "$tmpdepfile" >> "$depfile" 715 | sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" 716 | rm -f "$tmpdepfile" 717 | ;; 718 | 719 | msvisualcpp) 720 | # Important note: in order to support this mode, a compiler *must* 721 | # always write the preprocessed file to stdout. 722 | "$@" || exit $? 723 | 724 | # Remove the call to Libtool. 725 | if test "$libtool" = yes; then 726 | while test "X$1" != 'X--mode=compile'; do 727 | shift 728 | done 729 | shift 730 | fi 731 | 732 | IFS=" " 733 | for arg 734 | do 735 | case "$arg" in 736 | -o) 737 | shift 738 | ;; 739 | $object) 740 | shift 741 | ;; 742 | "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") 743 | set fnord "$@" 744 | shift 745 | shift 746 | ;; 747 | *) 748 | set fnord "$@" "$arg" 749 | shift 750 | shift 751 | ;; 752 | esac 753 | done 754 | "$@" -E 2>/dev/null | 755 | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" 756 | rm -f "$depfile" 757 | echo "$object : \\" > "$depfile" 758 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" 759 | echo "$tab" >> "$depfile" 760 | sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" 761 | rm -f "$tmpdepfile" 762 | ;; 763 | 764 | msvcmsys) 765 | # This case exists only to let depend.m4 do its work. It works by 766 | # looking at the text of this script. This case will never be run, 767 | # since it is checked for above. 768 | exit 1 769 | ;; 770 | 771 | none) 772 | exec "$@" 773 | ;; 774 | 775 | *) 776 | echo "Unknown depmode $depmode" 1>&2 777 | exit 1 778 | ;; 779 | esac 780 | 781 | exit 0 782 | 783 | # Local Variables: 784 | # mode: shell-script 785 | # sh-indentation: 2 786 | # eval: (add-hook 'write-file-hooks 'time-stamp) 787 | # time-stamp-start: "scriptversion=" 788 | # time-stamp-format: "%:y-%02m-%02d.%02H" 789 | # time-stamp-time-zone: "UTC" 790 | # time-stamp-end: "; # UTC" 791 | # End: 792 | -------------------------------------------------------------------------------- /distros/debian/README-DEBIAN: -------------------------------------------------------------------------------- 1 | The files in distros/debian/ may be used to build a binary deb package of 2 | udevil for use on Debian-based distros. See the CREATE DEB PACKAGE 3 | section in ../../README for step-by-step instructions. 4 | -------------------------------------------------------------------------------- /distros/debian/changelog: -------------------------------------------------------------------------------- 1 | udevil (0.4.4-1) unstable; urgency=low 2 | 3 | * release 4 | 5 | -- IgnorantGuru Mon, 04 May 2015 13:34:16 +0000 6 | -------------------------------------------------------------------------------- /distros/debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /distros/debian/control: -------------------------------------------------------------------------------- 1 | Source: udevil 2 | Section: utils 3 | Priority: optional 4 | Maintainer: IgnorantGuru 5 | Build-Depends: debhelper (>= 7.0.50~), autotools-dev, build-essential, libc6, 6 | libglib2.0-0, intltool, pkg-config, libglib2.0-dev, fakeroot, 7 | libudev0 (>=143) | libudev1, libudev-dev 8 | Standards-Version: 3.9.1 9 | Homepage: http://ignorantguru.github.com/udevil/ 10 | 11 | Package: udevil 12 | Architecture: any 13 | Depends: libc6, libglib2.0-0, libudev0 (>=143) | libudev1 14 | Recommends: 15 | Suggests: eject, cifs-utils, curlftpfs, sshfs, davfs2, spacefm 16 | Conflicts: devmon 17 | Provides: devmon 18 | Description: Mounts and unmounts removable devices and networks without a 19 | password (set suid), shows device info, monitors device changes. Includes 20 | the devmon automounting script. 21 | 22 | -------------------------------------------------------------------------------- /distros/debian/copyright: -------------------------------------------------------------------------------- 1 | Format: http://dep.debian.net/deps/dep5 2 | Upstream-Name: udevil 3 | Source: https://github.com/IgnorantGuru/udevil/tree/master/packages/ 4 | 5 | Files: * 6 | Copyright: 2012 IgnorantGuru 7 | License: GPL-3+ 8 | 9 | License: GPL-3+ 10 | This package is free software; you can redistribute it and/or modify 11 | it under the terms of the GNU General Public License as published by 12 | the Free Software Foundation; either version 3 of the License, or 13 | (at your option) any later version. 14 | . 15 | This package is distributed in the hope that it will be useful, 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | GNU General Public License for more details. 19 | . 20 | You should have received a copy of the GNU General Public License 21 | along with this program. If not, see 22 | . 23 | On Debian systems, the complete text of the GNU General 24 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 25 | -------------------------------------------------------------------------------- /distros/debian/docs: -------------------------------------------------------------------------------- 1 | NEWS 2 | README 3 | -------------------------------------------------------------------------------- /distros/debian/install: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /distros/debian/menu: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /distros/debian/postinst: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | configure) 6 | if [ ! -e /media ]; then 7 | mkdir /media 8 | fi 9 | 10 | # confine udevil execution to plugdev group members? 11 | UDEVIL_USE_PLUGDEV=0 12 | if [ $UDEVIL_USE_PLUGDEV -ne 0 ]; then 13 | for prog in /usr/bin/udevil; do 14 | if ! dpkg-statoverride --list $prog > /dev/null; then 15 | if ! getent group plugdev > /dev/null; then 16 | addgroup --quiet --system plugdev || true 17 | fi 18 | chown root:plugdev $prog 19 | chmod 4754 $prog 20 | fi 21 | done 22 | else 23 | chmod 4755 /usr/bin/udevil 24 | fi 25 | ;; 26 | 27 | abort-upgrade|abort-remove|abort-deconfigure) 28 | ;; 29 | 30 | *) 31 | echo "postinst called with unknown argument \`$1'" >&2 32 | exit 1 33 | ;; 34 | esac 35 | 36 | # dh_installdeb will replace this with shell code automatically 37 | # generated by other debhelper scripts. 38 | 39 | #DEBHELPER# 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /distros/debian/postrm: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | set -e 3 | 4 | case "$1" in 5 | purge) 6 | rm -rf /etc/udevil 7 | ;; 8 | esac 9 | 10 | # dh_installdeb will replace this with shell code automatically 11 | # generated by other debhelper scripts. 12 | 13 | #DEBHELPER# 14 | 15 | exit 0 16 | -------------------------------------------------------------------------------- /distros/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | # Sample debian/rules that uses debhelper. 4 | # This file was originally written by Joey Hess and Craig Small. 5 | # As a special exception, when this file is copied by dh-make into a 6 | # dh-make output file, you may use that output file without restriction. 7 | # This special exception was added by Craig Small in version 0.37 of dh-make. 8 | 9 | # Uncomment this to turn on verbose mode. 10 | #export DH_VERBOSE=1 11 | 12 | %: 13 | dh $@ 14 | 15 | override_dh_auto_configure: 16 | dh_auto_configure -- --disable-systemd 17 | -------------------------------------------------------------------------------- /distros/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /distros/debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | https://github.com/IgnorantGuru/udevil/tags .*/tarball/(\d[\d\.]+) 3 | -------------------------------------------------------------------------------- /etc/Makefile.am: -------------------------------------------------------------------------------- 1 | if ADD_SYSTEMD 2 | EXTRA_DIST = udevil.conf devmon devmon@.service 3 | else 4 | EXTRA_DIST = udevil.conf 5 | endif 6 | 7 | install-data-hook: 8 | test -d $(DESTDIR)/$(sysconfdir)/udevil || mkdir -p -- \ 9 | $(DESTDIR)/$(sysconfdir)/udevil 10 | test -f $(DESTDIR)/$(sysconfdir)/udevil/udevil.conf || $(INSTALL_DATA) \ 11 | $(srcdir)/udevil.conf \ 12 | $(DESTDIR)/$(sysconfdir)/udevil/udevil.conf 13 | if ADD_SYSTEMD 14 | test -d $(DESTDIR)/$(sysconfdir)/conf.d || mkdir -p -- \ 15 | $(DESTDIR)/$(sysconfdir)/conf.d 16 | test -f $(DESTDIR)/$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \ 17 | $(srcdir)/systemd/devmon \ 18 | $(DESTDIR)/$(sysconfdir)/conf.d/devmon 19 | test -d $(DESTDIR)/$(libdir)/systemd/system || \ 20 | mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system 21 | $(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \ 22 | $(DESTDIR)/$(libdir)/systemd/system/devmon@.service 23 | endif 24 | -------------------------------------------------------------------------------- /etc/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | VPATH = @srcdir@ 17 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 18 | am__make_running_with_option = \ 19 | case $${target_option-} in \ 20 | ?) ;; \ 21 | *) echo "am__make_running_with_option: internal error: invalid" \ 22 | "target option '$${target_option-}' specified" >&2; \ 23 | exit 1;; \ 24 | esac; \ 25 | has_opt=no; \ 26 | sane_makeflags=$$MAKEFLAGS; \ 27 | if $(am__is_gnu_make); then \ 28 | sane_makeflags=$$MFLAGS; \ 29 | else \ 30 | case $$MAKEFLAGS in \ 31 | *\\[\ \ ]*) \ 32 | bs=\\; \ 33 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 34 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 35 | esac; \ 36 | fi; \ 37 | skip_next=no; \ 38 | strip_trailopt () \ 39 | { \ 40 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 41 | }; \ 42 | for flg in $$sane_makeflags; do \ 43 | test $$skip_next = yes && { skip_next=no; continue; }; \ 44 | case $$flg in \ 45 | *=*|--*) continue;; \ 46 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 47 | -*I?*) strip_trailopt 'I';; \ 48 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 49 | -*O?*) strip_trailopt 'O';; \ 50 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 51 | -*l?*) strip_trailopt 'l';; \ 52 | -[dEDm]) skip_next=yes;; \ 53 | -[JT]) skip_next=yes;; \ 54 | esac; \ 55 | case $$flg in \ 56 | *$$target_option*) has_opt=yes; break;; \ 57 | esac; \ 58 | done; \ 59 | test $$has_opt = yes 60 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 61 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 62 | pkgdatadir = $(datadir)/@PACKAGE@ 63 | pkgincludedir = $(includedir)/@PACKAGE@ 64 | pkglibdir = $(libdir)/@PACKAGE@ 65 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 66 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 67 | install_sh_DATA = $(install_sh) -c -m 644 68 | install_sh_PROGRAM = $(install_sh) -c 69 | install_sh_SCRIPT = $(install_sh) -c 70 | INSTALL_HEADER = $(INSTALL_DATA) 71 | transform = $(program_transform_name) 72 | NORMAL_INSTALL = : 73 | PRE_INSTALL = : 74 | POST_INSTALL = : 75 | NORMAL_UNINSTALL = : 76 | PRE_UNINSTALL = : 77 | POST_UNINSTALL = : 78 | build_triplet = @build@ 79 | host_triplet = @host@ 80 | subdir = etc 81 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 82 | $(top_srcdir)/mkinstalldirs 83 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 84 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 85 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 86 | $(ACLOCAL_M4) 87 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 88 | CONFIG_HEADER = $(top_builddir)/config.h 89 | CONFIG_CLEAN_FILES = 90 | CONFIG_CLEAN_VPATH_FILES = 91 | AM_V_P = $(am__v_P_@AM_V@) 92 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 93 | am__v_P_0 = false 94 | am__v_P_1 = : 95 | AM_V_GEN = $(am__v_GEN_@AM_V@) 96 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 97 | am__v_GEN_0 = @echo " GEN " $@; 98 | am__v_GEN_1 = 99 | AM_V_at = $(am__v_at_@AM_V@) 100 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 101 | am__v_at_0 = @ 102 | am__v_at_1 = 103 | SOURCES = 104 | DIST_SOURCES = 105 | am__can_run_installinfo = \ 106 | case $$AM_UPDATE_INFO_DIR in \ 107 | n|no|NO) false;; \ 108 | *) (install-info --version) >/dev/null 2>&1;; \ 109 | esac 110 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 111 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 112 | ACLOCAL = @ACLOCAL@ 113 | ALL_LINGUAS = @ALL_LINGUAS@ 114 | AMTAR = @AMTAR@ 115 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 116 | AR = @AR@ 117 | AUTOCONF = @AUTOCONF@ 118 | AUTOHEADER = @AUTOHEADER@ 119 | AUTOMAKE = @AUTOMAKE@ 120 | AWK = @AWK@ 121 | CATALOGS = @CATALOGS@ 122 | CATOBJEXT = @CATOBJEXT@ 123 | CC = @CC@ 124 | CCDEPMODE = @CCDEPMODE@ 125 | CFLAGS = @CFLAGS@ 126 | CPP = @CPP@ 127 | CPPFLAGS = @CPPFLAGS@ 128 | CYGPATH_W = @CYGPATH_W@ 129 | DATADIRNAME = @DATADIRNAME@ 130 | DEFS = @DEFS@ 131 | DEPDIR = @DEPDIR@ 132 | DLLTOOL = @DLLTOOL@ 133 | DSYMUTIL = @DSYMUTIL@ 134 | DUMPBIN = @DUMPBIN@ 135 | ECHO_C = @ECHO_C@ 136 | ECHO_N = @ECHO_N@ 137 | ECHO_T = @ECHO_T@ 138 | EGREP = @EGREP@ 139 | EXEEXT = @EXEEXT@ 140 | FGREP = @FGREP@ 141 | GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 142 | GLIB_CFLAGS = @GLIB_CFLAGS@ 143 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ 144 | GLIB_LIBS = @GLIB_LIBS@ 145 | GMOFILES = @GMOFILES@ 146 | GMSGFMT = @GMSGFMT@ 147 | GREP = @GREP@ 148 | INSTALL = @INSTALL@ 149 | INSTALL_DATA = @INSTALL_DATA@ 150 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 151 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 152 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 153 | INSTOBJEXT = @INSTOBJEXT@ 154 | INTLLIBS = @INTLLIBS@ 155 | INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 156 | INTLTOOL_MERGE = @INTLTOOL_MERGE@ 157 | INTLTOOL_PERL = @INTLTOOL_PERL@ 158 | INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 159 | INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ 160 | INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ 161 | INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ 162 | INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ 163 | LD = @LD@ 164 | LDFLAGS = @LDFLAGS@ 165 | LIBOBJS = @LIBOBJS@ 166 | LIBS = @LIBS@ 167 | LIBTOOL = @LIBTOOL@ 168 | LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ 169 | LIBUDEV_LIBS = @LIBUDEV_LIBS@ 170 | LIPO = @LIPO@ 171 | LN_S = @LN_S@ 172 | LTLIBOBJS = @LTLIBOBJS@ 173 | MAINT = @MAINT@ 174 | MAKEINFO = @MAKEINFO@ 175 | MANIFEST_TOOL = @MANIFEST_TOOL@ 176 | MKDIR_P = @MKDIR_P@ 177 | MKINSTALLDIRS = @MKINSTALLDIRS@ 178 | MSGFMT = @MSGFMT@ 179 | MSGFMT_OPTS = @MSGFMT_OPTS@ 180 | MSGMERGE = @MSGMERGE@ 181 | NM = @NM@ 182 | NMEDIT = @NMEDIT@ 183 | OBJDUMP = @OBJDUMP@ 184 | OBJEXT = @OBJEXT@ 185 | OTOOL = @OTOOL@ 186 | OTOOL64 = @OTOOL64@ 187 | PACKAGE = @PACKAGE@ 188 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 189 | PACKAGE_NAME = @PACKAGE_NAME@ 190 | PACKAGE_STRING = @PACKAGE_STRING@ 191 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 192 | PACKAGE_URL = @PACKAGE_URL@ 193 | PACKAGE_VERSION = @PACKAGE_VERSION@ 194 | PATH_SEPARATOR = @PATH_SEPARATOR@ 195 | PKG_CONFIG = @PKG_CONFIG@ 196 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 197 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 198 | POFILES = @POFILES@ 199 | POSUB = @POSUB@ 200 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ 201 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ 202 | RANLIB = @RANLIB@ 203 | SED = @SED@ 204 | SET_MAKE = @SET_MAKE@ 205 | SHELL = @SHELL@ 206 | STRIP = @STRIP@ 207 | USE_NLS = @USE_NLS@ 208 | VERSION = @VERSION@ 209 | XGETTEXT = @XGETTEXT@ 210 | abs_builddir = @abs_builddir@ 211 | abs_srcdir = @abs_srcdir@ 212 | abs_top_builddir = @abs_top_builddir@ 213 | abs_top_srcdir = @abs_top_srcdir@ 214 | ac_ct_AR = @ac_ct_AR@ 215 | ac_ct_CC = @ac_ct_CC@ 216 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 217 | am__include = @am__include@ 218 | am__leading_dot = @am__leading_dot@ 219 | am__quote = @am__quote@ 220 | am__tar = @am__tar@ 221 | am__untar = @am__untar@ 222 | bindir = @bindir@ 223 | build = @build@ 224 | build_alias = @build_alias@ 225 | build_cpu = @build_cpu@ 226 | build_os = @build_os@ 227 | build_vendor = @build_vendor@ 228 | builddir = @builddir@ 229 | datadir = @datadir@ 230 | datarootdir = @datarootdir@ 231 | docdir = @docdir@ 232 | dvidir = @dvidir@ 233 | exec_prefix = @exec_prefix@ 234 | host = @host@ 235 | host_alias = @host_alias@ 236 | host_cpu = @host_cpu@ 237 | host_os = @host_os@ 238 | host_vendor = @host_vendor@ 239 | htmldir = @htmldir@ 240 | includedir = @includedir@ 241 | infodir = @infodir@ 242 | install_sh = @install_sh@ 243 | intltool__v_merge_options_ = @intltool__v_merge_options_@ 244 | intltool__v_merge_options_0 = @intltool__v_merge_options_0@ 245 | libdir = @libdir@ 246 | libexecdir = @libexecdir@ 247 | localedir = @localedir@ 248 | localstatedir = @localstatedir@ 249 | mandir = @mandir@ 250 | mkdir_p = @mkdir_p@ 251 | oldincludedir = @oldincludedir@ 252 | pdfdir = @pdfdir@ 253 | prefix = @prefix@ 254 | program_transform_name = @program_transform_name@ 255 | psdir = @psdir@ 256 | sbindir = @sbindir@ 257 | sharedstatedir = @sharedstatedir@ 258 | srcdir = @srcdir@ 259 | sysconfdir = @sysconfdir@ 260 | target_alias = @target_alias@ 261 | top_build_prefix = @top_build_prefix@ 262 | top_builddir = @top_builddir@ 263 | top_srcdir = @top_srcdir@ 264 | @ADD_SYSTEMD_FALSE@EXTRA_DIST = udevil.conf 265 | @ADD_SYSTEMD_TRUE@EXTRA_DIST = udevil.conf devmon devmon@.service 266 | all: all-am 267 | 268 | .SUFFIXES: 269 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) 270 | @for dep in $?; do \ 271 | case '$(am__configure_deps)' in \ 272 | *$$dep*) \ 273 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 274 | && { if test -f $@; then exit 0; else break; fi; }; \ 275 | exit 1;; \ 276 | esac; \ 277 | done; \ 278 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ 279 | $(am__cd) $(top_srcdir) && \ 280 | $(AUTOMAKE) --gnu etc/Makefile 281 | .PRECIOUS: Makefile 282 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 283 | @case '$?' in \ 284 | *config.status*) \ 285 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 286 | *) \ 287 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 288 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 289 | esac; 290 | 291 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 292 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 293 | 294 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 295 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 296 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) 297 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 298 | $(am__aclocal_m4_deps): 299 | 300 | mostlyclean-libtool: 301 | -rm -f *.lo 302 | 303 | clean-libtool: 304 | -rm -rf .libs _libs 305 | tags TAGS: 306 | 307 | ctags CTAGS: 308 | 309 | cscope cscopelist: 310 | 311 | 312 | distdir: $(DISTFILES) 313 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 314 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 315 | list='$(DISTFILES)'; \ 316 | dist_files=`for file in $$list; do echo $$file; done | \ 317 | sed -e "s|^$$srcdirstrip/||;t" \ 318 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 319 | case $$dist_files in \ 320 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 321 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 322 | sort -u` ;; \ 323 | esac; \ 324 | for file in $$dist_files; do \ 325 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 326 | if test -d $$d/$$file; then \ 327 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 328 | if test -d "$(distdir)/$$file"; then \ 329 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 330 | fi; \ 331 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 332 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 333 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 334 | fi; \ 335 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 336 | else \ 337 | test -f "$(distdir)/$$file" \ 338 | || cp -p $$d/$$file "$(distdir)/$$file" \ 339 | || exit 1; \ 340 | fi; \ 341 | done 342 | check-am: all-am 343 | check: check-am 344 | all-am: Makefile 345 | installdirs: 346 | install: install-am 347 | install-exec: install-exec-am 348 | install-data: install-data-am 349 | uninstall: uninstall-am 350 | 351 | install-am: all-am 352 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 353 | 354 | installcheck: installcheck-am 355 | install-strip: 356 | if test -z '$(STRIP)'; then \ 357 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 358 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 359 | install; \ 360 | else \ 361 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 362 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 363 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 364 | fi 365 | mostlyclean-generic: 366 | 367 | clean-generic: 368 | 369 | distclean-generic: 370 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 371 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 372 | 373 | maintainer-clean-generic: 374 | @echo "This command is intended for maintainers to use" 375 | @echo "it deletes files that may require special tools to rebuild." 376 | clean: clean-am 377 | 378 | clean-am: clean-generic clean-libtool mostlyclean-am 379 | 380 | distclean: distclean-am 381 | -rm -f Makefile 382 | distclean-am: clean-am distclean-generic 383 | 384 | dvi: dvi-am 385 | 386 | dvi-am: 387 | 388 | html: html-am 389 | 390 | html-am: 391 | 392 | info: info-am 393 | 394 | info-am: 395 | 396 | install-data-am: 397 | @$(NORMAL_INSTALL) 398 | $(MAKE) $(AM_MAKEFLAGS) install-data-hook 399 | install-dvi: install-dvi-am 400 | 401 | install-dvi-am: 402 | 403 | install-exec-am: 404 | 405 | install-html: install-html-am 406 | 407 | install-html-am: 408 | 409 | install-info: install-info-am 410 | 411 | install-info-am: 412 | 413 | install-man: 414 | 415 | install-pdf: install-pdf-am 416 | 417 | install-pdf-am: 418 | 419 | install-ps: install-ps-am 420 | 421 | install-ps-am: 422 | 423 | installcheck-am: 424 | 425 | maintainer-clean: maintainer-clean-am 426 | -rm -f Makefile 427 | maintainer-clean-am: distclean-am maintainer-clean-generic 428 | 429 | mostlyclean: mostlyclean-am 430 | 431 | mostlyclean-am: mostlyclean-generic mostlyclean-libtool 432 | 433 | pdf: pdf-am 434 | 435 | pdf-am: 436 | 437 | ps: ps-am 438 | 439 | ps-am: 440 | 441 | uninstall-am: 442 | 443 | .MAKE: install-am install-data-am install-strip 444 | 445 | .PHONY: all all-am check check-am clean clean-generic clean-libtool \ 446 | cscopelist-am ctags-am distclean distclean-generic \ 447 | distclean-libtool distdir dvi dvi-am html html-am info info-am \ 448 | install install-am install-data install-data-am \ 449 | install-data-hook install-dvi install-dvi-am install-exec \ 450 | install-exec-am install-html install-html-am install-info \ 451 | install-info-am install-man install-pdf install-pdf-am \ 452 | install-ps install-ps-am install-strip installcheck \ 453 | installcheck-am installdirs maintainer-clean \ 454 | maintainer-clean-generic mostlyclean mostlyclean-generic \ 455 | mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ 456 | uninstall-am 457 | 458 | 459 | install-data-hook: 460 | test -d $(DESTDIR)/$(sysconfdir)/udevil || mkdir -p -- \ 461 | $(DESTDIR)/$(sysconfdir)/udevil 462 | test -f $(DESTDIR)/$(sysconfdir)/udevil/udevil.conf || $(INSTALL_DATA) \ 463 | $(srcdir)/udevil.conf \ 464 | $(DESTDIR)/$(sysconfdir)/udevil/udevil.conf 465 | @ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)/$(sysconfdir)/conf.d || mkdir -p -- \ 466 | @ADD_SYSTEMD_TRUE@ $(DESTDIR)/$(sysconfdir)/conf.d 467 | @ADD_SYSTEMD_TRUE@ test -f $(DESTDIR)/$(sysconfdir)/conf.d/devmon || $(INSTALL_DATA) \ 468 | @ADD_SYSTEMD_TRUE@ $(srcdir)/systemd/devmon \ 469 | @ADD_SYSTEMD_TRUE@ $(DESTDIR)/$(sysconfdir)/conf.d/devmon 470 | @ADD_SYSTEMD_TRUE@ test -d $(DESTDIR)/$(libdir)/systemd/system || \ 471 | @ADD_SYSTEMD_TRUE@ mkdir -p -- $(DESTDIR)/$(libdir)/systemd/system 472 | @ADD_SYSTEMD_TRUE@ $(INSTALL_DATA) $(srcdir)/systemd/devmon@.service \ 473 | @ADD_SYSTEMD_TRUE@ $(DESTDIR)/$(libdir)/systemd/system/devmon@.service 474 | 475 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 476 | # Otherwise a system limit (for SysV at least) may be exceeded. 477 | .NOEXPORT: 478 | -------------------------------------------------------------------------------- /etc/systemd/README: -------------------------------------------------------------------------------- 1 | devmon systemd service 2 | ====================== 3 | 4 | Note: If using a sysconfdir other than /etc or an install prefix other than 5 | /usr, the file devmon@.service must be edited to use the correct paths. 6 | 7 | To Install: (this is done by the build system) 8 | 9 | cd etc/systemd 10 | install -Dm644 devmon /etc/conf.d/devmon 11 | install -Dm644 devmon@.service /usr/lib/systemd/system/devmon@.service 12 | 13 | To Start: (this is not done automatically) 14 | 15 | systemctl start devmon@ 16 | 17 | -------------------------------------------------------------------------------- /etc/systemd/devmon: -------------------------------------------------------------------------------- 1 | ARGS="" 2 | -------------------------------------------------------------------------------- /etc/systemd/devmon@.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=devmon Service 3 | 4 | [Service] 5 | Type=simple 6 | User=%i 7 | # Set DISPLAY for popup dialogs 8 | Environment=DISPLAY=:0 9 | EnvironmentFile=/etc/conf.d/devmon 10 | ExecStart=/usr/bin/devmon $ARGS 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /etc/udevil.conf: -------------------------------------------------------------------------------- 1 | ############################################################################## 2 | # 3 | # udevil configuration file /etc/udevil/udevil.conf 4 | # 5 | # This file controls what devices, networks, and files users may mount and 6 | # unmount via udevil (set suid). 7 | # 8 | # IMPORTANT: IT IS POSSIBLE TO CREATE SERIOUS SECURITY PROBLEMS IF THIS FILE 9 | # IS MISCONFIGURED - EDIT WITH CARE 10 | # 11 | # Note: For greater control for specific users, including root, copy this 12 | # file to /etc/udevil/udevil-user-USERNAME.conf replacing USERNAME with the 13 | # desired username (eg /etc/udevil/udevil-user-jim.conf). 14 | # 15 | # Format: 16 | # OPTION = VALUE[, VALUE, ...] 17 | # 18 | # DO NOT USE QUOTES except literally 19 | # Lines beginning with # are ignored 20 | # 21 | ############################################################################## 22 | 23 | 24 | # To log all uses of udevil, set log_file to a file path: 25 | # log_file = /var/log/udevil.log 26 | 27 | # Approximate number of days to retain log entries (0=forever, max=60): 28 | log_keep_days = 10 29 | 30 | 31 | # allowed_types determines what fstypes can be passed by a user to the u/mount 32 | # program, what device filesystems may be un/mounted implicitly, and what 33 | # network filesystems may be un/mounted. 34 | # It may also include the 'file' keyword, indicating that the user is allowed 35 | # to mount files (eg an ISO file). The $KNOWN_FILESYSTEMS variable may 36 | # be included to include common local filesystems as well as those listed in 37 | # /etc/filesystems and /proc/filesystems. 38 | # allowed_types_USERNAME, if present, is used to override allowed_types for 39 | # the specific user 'USERNAME'. For example, to allow user 'jim' to mount 40 | # only vfat filesystems, add: 41 | # allowed_types_jim = vfat 42 | # Setting allowed_types = * does NOT allow all types, as this is a security 43 | # risk, but does allow all recognized types. 44 | # allowed_types = $KNOWN_FILESYSTEMS, file, cifs, smbfs, nfs, curlftpfs, ftpfs, sshfs, davfs, tmpfs, ramfs 45 | allowed_types = $KNOWN_FILESYSTEMS, file 46 | 47 | 48 | # allowed_users is a list of users permitted to mount and unmount with udevil. 49 | # Wildcards (* or ?) may be used in the usernames. To allow all users, 50 | # specify "allowed_users=*". UIDs may be included using the form UID=1000. 51 | # For example: allowed_users = carl, UID=1000, pre* 52 | # Also note that permission to execute udevil may be limited to users belonging 53 | # to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage', 54 | # depending on installation. 55 | # allowed_users_FSTYPE, if present, is used to override allowed_users when 56 | # mounting or unmounting a specific fstype (eg nfs, ext3, file). 57 | # Note that when mounting a file, fstype will always be 'file' regardless of 58 | # the internal fstype of the file. 59 | # For example, to allow only user 'bob' to mount nfs shares, add: 60 | # allowed_users_nfs = bob 61 | # The root user is NOT automatically allowed to use udevil in some cases unless 62 | # listed here (except for unmounting anything or mounting fstab devices). 63 | allowed_users = * 64 | 65 | 66 | # allowed_groups is a list of groups permitted to mount and unmount with 67 | # udevil. The user MUST belong to at least one of these groups. Wildcards 68 | # or GIDs may NOT be used in group names, but a single * may be used to allow 69 | # all groups. 70 | # Also note that permission to execute udevil may be limited to users belonging 71 | # to the group that owns /usr/bin/udevil, such as 'plugdev' or 'storage', 72 | # depending on installation. 73 | # allowed_groups_FSTYPE, if present, is used to override allowed_groups when 74 | # mounting or unmounting a specific fstype (eg nfs, ext3, file). For example, 75 | # to allow only members of the 'network' group to mount smb and nfs shares, 76 | # use both of these lines: 77 | # allowed_groups_smbfs = network 78 | # allowed_groups_nfs = network 79 | # The root user is NOT automatically allowed to use udevil in some cases unless 80 | # listed here (except for unmounting anything or mounting fstab devices). 81 | allowed_groups = * 82 | 83 | 84 | # allowed_media_dirs specifies the media directories in which user mount points 85 | # may be located. The first directory which exists and does not contain a 86 | # wildcard will be used as the default media directory (normally /media or 87 | # /media/$USER). 88 | # The $USER variable, if included, will be replaced with the username of the 89 | # user running udevil. Wildcards may also be used in any directory EXCEPT the 90 | # default. Wildcards will not match a /, except a /** suffix for recursion. 91 | # allowed_media_dirs_FSTYPE, if present, is used to override allowed_media_dirs 92 | # when mounting or unmounting a specific fstype (eg ext2, nfs). For example, 93 | # to cause /media/network to be used as the default media directory for 94 | # nfs and ftpfs mounts, use these two lines: 95 | # allowed_media_dirs_nfs = /media/network, /media, /media/$USER 96 | # allowed_media_dirs_ftpfs = /media/network, /media, /media/$USER 97 | # NOTE: If you want only the user who mounted a device to have access to it 98 | # and be allowed to unmount it, specify /media/$USER as the first 99 | # allowed media directory (only /media/$USER is created on demand). 100 | # IMPORTANT: If an allowed file is mounted to a media directory, the user may 101 | # be permitted to unmount its associated loop device even though internal. 102 | # INCLUDING /MNT HERE IS NOT RECOMMENDED. ALL ALLOWED MEDIA DIRECTORIES 103 | # SHOULD BE OWNED AND WRITABLE ONLY BY ROOT. 104 | allowed_media_dirs = /media, /media/$USER, /run/media/$USER 105 | 106 | 107 | # allowed_devices is the first criteria for what block devices users may mount 108 | # or unmount. If a device is not listed in allowed_devices, it cannot be 109 | # un/mounted (unless in fstab). However, even if a device is listed, other 110 | # factors may prevent its use. For example, access to system internal devices 111 | # will be denied to normal users even if they are included in allowed_devices. 112 | # allowed_devices_FSTYPE, if present, is used to override allowed_devices when 113 | # mounting or unmounting a specific fstype (eg ext3, ntfs). For example, to 114 | # prevent all block devices containing an ext4 filesystem from being 115 | # un/mounted use: 116 | # allowed_devices_ext4 = 117 | # Note: Wildcards may be used, but a wildcard will never match a /, except 118 | # for "allowed_devices=*" which allows any device. The recommended setting is 119 | # allowed_devices = /dev/* 120 | # WARNING: ALLOWING USERS TO MOUNT DEVICES OUTSIDE OF /dev CAN CAUSE SERIOUS 121 | # SECURITY PROBLEMS. DO NOT ALLOW DEVICES IN /dev/shm 122 | allowed_devices = /dev/* 123 | 124 | 125 | # allowed_internal_devices causes udevil to treat any listed block devices as 126 | # removable, thus allowing normal users to un/mount them (providing they are 127 | # also listed in allowed_devices). 128 | # allowed_internal_devices_FSTYPE, if present, is used to override 129 | # allowed_internal_devices when mounting or unmounting a specific fstype 130 | # (eg ext3, ntfs). For example, to allow block devices containing a vfat 131 | # filesystem to be un/mounted even if they are system internal devices, use: 132 | # allowed_internal_devices_vfat = /dev/sdb* 133 | # Some removable esata drives look like internal drives to udevil. To avoid 134 | # this problem, they can be treated as removable with this setting. 135 | # WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS. 136 | # allowed_internal_devices = 137 | 138 | 139 | # allowed_internal_uuids and allowed_internal_uuids_FSTYPE work similarly to 140 | # allowed_internal_devices, except that UUIDs are specified instead of devices. 141 | # For example, to allow un/mounting of an internal filesystem based on UUID: 142 | # allowed_internal_uuids = cc0c4489-8def-1e5b-a304-ab87c3cb626c0 143 | # WARNING: SETTING A SYSTEM DEVICE HERE CAN CAUSE SERIOUS SECURITY PROBLEMS. 144 | # allowed_internal_uuids = 145 | 146 | 147 | # forbidden_devices is used to prevent block devices from being un/mounted 148 | # even if other settings would allow them (except devices in fstab). 149 | # forbidden_devices_FSTYPE, if present, is used to override 150 | # forbidden_devices when mounting or unmounting a specific fstype 151 | # (eg ext3, ntfs). For example, to prevent device /dev/sdd1 from being 152 | # mounted when it contains an ntfs filesystem, use: 153 | # forbidden_devices_ntfs = /dev/sdd1 154 | # NOTE: device node paths are canonicalized before being tested, so forbidding 155 | # a link to a device will have no effect. 156 | forbidden_devices = 157 | 158 | 159 | # allowed_networks determines what hosts may be un/mounted by udevil users when 160 | # using nfs, cifs, smbfs, curlftpfs, ftpfs, or sshfs. Hosts may be specified 161 | # using a hostname (eg myserver.com) or IP address (192.168.1.100). 162 | # Wildcards may be used in hostnames and IP addresses, but CIDR notation 163 | # (192.168.1.0/16) is NOT supported. IP v6 is supported. For example: 164 | # allowed_networks = 127.0.0.1, 192.168.1.*, 10.0.0.*, localmachine, *.okay.com 165 | # Or, to prevent un/mounting of any network shares, set: 166 | # allowed_networks = 167 | # allowed_networks_FSTYPE, if present, is used to override allowed_networks 168 | # when mounting or unmounting a specific network fstype (eg nfs, cifs, sshfs, 169 | # curlftpfs). For example, to limit nfs and samba shares to only local 170 | # networks, use these two lines: 171 | # allowed_networks_nfs = 192.168.1.*, 10.0.0.* 172 | # allowed_networks_cifs = 192.168.1.*, 10.0.0.* 173 | allowed_networks = * 174 | 175 | 176 | # forbidden_networks and forbidden_networks_FSTYPE are used to specify networks 177 | # that are never allowed, even if other settings allow them (except fstab). 178 | # NO REVERSE LOOKUP IS PERFORMED, so including bad.com will only have an effect 179 | # if the user uses that hostname. IP lookup is always performed, so forbidding 180 | # an IP address will also forbid all corresponding hostnames. 181 | forbidden_networks = 182 | 183 | 184 | # allowed_files is used to determine what files in what directories may be 185 | # un/mounted. A user must also have read permission on a file to mount it. 186 | # Note: Wildcards may be used, but a wildcard will never match a /, except 187 | # for "allowed_files=*" which allows any file, and a /** suffix, which matches 188 | # all files recursively. 189 | # For example, to allow only files in the /share directory to be mounted, use: 190 | # allowed_files = /share/* 191 | # To allow all files in the /share directory AND all subdirectories use: 192 | # allowed_files = /share/** 193 | # NOTE: Specifying allowed_files_FSTYPE will NOT work because the fstype of 194 | # files is always 'file'. 195 | allowed_files = * 196 | 197 | 198 | # forbidden_files is used to specify files that are never allowed, even if 199 | # other settings allow them (except fstab). Specify a full path. 200 | # Note: Wildcards may be used, but a wildcard will never match a /, except 201 | # for "forbidden_files = *", or a /** suffix, which matches all recursively. 202 | # NOTE: file paths are canonicalized before being tested, so forbidding 203 | # a link to a file will have no effect. 204 | forbidden_files = 205 | 206 | 207 | # default_options specifies what options are always included when performing 208 | # a mount, in addition to any options the user may specify. 209 | # Note: When a device is present in /etc/fstab, and the user does not specify 210 | # a mount point, the device is mounted with normal user permissions using 211 | # the fstab entry, without these options. 212 | # default_options_FSTYPE, if present, is used to override default_options 213 | # when mounting a specific fstype (eg ext2, nfs). 214 | # The variables $USER, $UID, and $GID are changed to the user's username, UID, 215 | # and GID. 216 | # FOR GOOD SECURITY, default_options SHOULD ALWAYS INCLUDE: nosuid,noexec,nodev 217 | # WARNING: OPTIONS PRESENT OR MISSING CAN CAUSE SERIOUS SECURITY PROBLEMS. 218 | default_options = nosuid, noexec, nodev, noatime 219 | default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro 220 | # mount iso9660 with 'ro' to prevent mount read-only warning 221 | default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8 222 | default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID 223 | default_options_vfat = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, utf8 224 | default_options_exfat = nosuid, noexec, nodev, noatime, umask=0077, uid=$UID, gid=$GID, iocharset=utf8, namecase=0, nonempty 225 | default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID 226 | default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID 227 | default_options_ntfs = nosuid, noexec, nodev, noatime, fmask=0133, uid=$UID, gid=$GID, utf8 228 | default_options_cifs = nosuid, noexec, nodev, uid=$UID, gid=$GID 229 | default_options_smbfs = nosuid, noexec, nodev, uid=$UID, gid=$GID 230 | default_options_sshfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other 231 | default_options_curlftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, nonempty, allow_other 232 | default_options_ftpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID 233 | default_options_davfs = nosuid, noexec, nodev, uid=$UID, gid=$GID 234 | default_options_tmpfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID 235 | default_options_ramfs = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID 236 | 237 | 238 | # allowed_options determines all options that a user may specify when mounting. 239 | # All the options used in default_options above must be included here too, or 240 | # they will be rejected. If the user attempts to use an option not included 241 | # here, an error will result. Wildcards may be used. 242 | # allowed_options_FSTYPE, if present, is used to override allowed_options 243 | # when mounting a specific fstype (eg ext2, nfs). 244 | # The variables $USER, $UID, and $GID are changed to the user's username, UID, 245 | # and GID. 246 | # If you want to forbid remounts, remove 'remount' from here. 247 | # WARNING: OPTIONS HERE CAN CAUSE SERIOUS SECURITY PROBLEMS - CHOOSE CAREFULLY 248 | allowed_options = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, ro, rw, sync, flush, iocharset=*, utf8, remount 249 | allowed_options_nfs = nosuid, noexec, nodev, noatime, ro, rw, sync, remount, port=*, rsize=*, wsize=*, hard, proto=*, timeo=*, retrans=* 250 | allowed_options_cifs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=* 251 | allowed_options_smbfs = nosuid, noexec, nodev, ro, rw, remount, port=*, user=*, username=*, pass=*, password=*, guest, domain=*, uid=$UID, gid=$GID, credentials=* 252 | allowed_options_sshfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, idmap=user, BatchMode=yes, port=* 253 | allowed_options_curlftpfs = nosuid, noexec, nodev, noatime, ro, rw, uid=$UID, gid=$GID, nonempty, allow_other, user=* 254 | allowed_options_ftpfs = nosuid, noexec, nodev, noatime, ro, rw, port=*, user=*, pass=*, root=*, uid=$UID, gid=$GID 255 | allowed_options_exfat = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID, umask=0077, namecase=*, ro, rw, sync, flush, iocharset=*, remount, nonempty 256 | 257 | 258 | # mount_point_mode, if present and set to a non-empty value, will cause udevil 259 | # to set the mode (permissions) on the moint point after mounting If not 260 | # specified or if left empty, the mode is not changed. Mode must be octal 261 | # starting with a zero (0755). 262 | # mount_point_mode_FSTYPE, if present, is used to override mount_point_mode 263 | # when mounting a specific fstype (eg ext2, nfs). 264 | # NOT SETTING A MODE CAN HAVE SECURITY IMPLICATIONS FOR SOME FSTYPES 265 | mount_point_mode = 0755 266 | # don't set a mode for some types: 267 | mount_point_mode_sshfs = 268 | mount_point_mode_curlftpfs = 269 | mount_point_mode_ftpfs = 270 | 271 | 272 | # Use the settings below to change the default locations of programs used by 273 | # udevil, or (advanced topic) to redirect commands to your scripts. 274 | # When substituting scripts, make sure they are root-owned and accept the 275 | # options used by udevil (for example, the mount_program must accept --fake, 276 | # -o, -v, and other options valid to mount.) 277 | # Be sure to specify the full path and include NO OPTIONS or other arguments. 278 | # These programs may also be specified as configure options when building 279 | # udevil. 280 | # THESE PROGRAMS ARE RUN AS ROOT 281 | # mount_program = /bin/mount 282 | # umount_program = /bin/umount 283 | # losetup_program = /sbin/losetup 284 | # setfacl_program = /usr/bin/setfacl 285 | 286 | 287 | # validate_exec specifies a program or script which provides additional 288 | # validation of a mount or unmount command, beyond the checks performed by 289 | # udevil. The program is run as a normal user (if root runs udevil, 290 | # validate_exec will NOT be run). The program is NOT run if the user is 291 | # mounting a device without root priviledges (a device in fstab). 292 | # The program is passed the username, a printable description of what is 293 | # happening, and the entire udevil command line as the first three arguments. 294 | # The program must return an exit status of 0 to allow the mount or unmount 295 | # to proceed. If it returns non-zero, the user will be denied permission. 296 | # For example, validate_exec might specify a script which notifies you 297 | # of the command being run, or performs additional steps to authenticate the 298 | # user. 299 | # Specify a full path to the program, with NO options or arguments. 300 | # validate_exec = 301 | 302 | 303 | # validate_rootexec works similarly to validate_exec, except that the program 304 | # is run as root. validate_rootexec will also be run if the root user runs 305 | # udevil. If both validate_exec and validate_rootexec are specified, 306 | # validate_rootexec will run first, followed by validate_exec. 307 | # The program must return an exit status of 0 to allow the mount or unmount 308 | # to proceed. If it returns non-zero, the user will be denied permission. 309 | # Unless you are familiar with writing root scripts, it is recommended that 310 | # rootexec settings NOT be used, as it is easy to inadvertently open exploits. 311 | # THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not. 312 | # validate_rootexec = 313 | 314 | 315 | # success_exec is run after a successful mount, remount, or unmount. The 316 | # program is run as a normal user (if root runs udevil, success_exec 317 | # will NOT be run). 318 | # The program is passed the username, a printable description of what action 319 | # was taken, and the entire udevil command line as the first three arguments. 320 | # The program's exit status is ignored. 321 | # For example, success_exec might run a script which informs you of what action 322 | # was taken, and might perform further actions. 323 | # Specify a full path to the program, with NO options or arguments. 324 | # success_exec = 325 | 326 | 327 | # success_rootexec works similarly to success_exec, except that the program is 328 | # run as root. success_rootexec will also be run if the root user runs udevil. 329 | # If both success_exec and success_rootexec are specified, success_rootexec 330 | # will run first, followed by success_exec. 331 | # Unless you are familiar with writing root scripts, it is recommended that 332 | # rootexec settings NOT be used, as it is easy to inadvertently open exploits. 333 | # THIS PROGRAM IS ALWAYS RUN AS ROOT, even if the user running udevil is not. 334 | # success_rootexec = 335 | 336 | -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # udevil installer 3 | # Usage: ./install [CONFIGURE-OPTIONS] 4 | 5 | build_deps='autotools-dev build-essential libc6 libglib2.0-0 intltool pkg-config libglib2.0-dev fakeroot libudev0 (>=143) libudev-dev' 6 | 7 | if [ "$1" = "--help" ]; then 8 | ./configure --help 9 | exit 10 | fi 11 | 12 | echo "Running configure: ./configure \"$@\"" 13 | ./configure "$@" 14 | if [ $? -ne 0 ]; then 15 | echo 16 | echo "configure was not successful, probably due to missing build" 17 | echo "dependencies. Examine the message above to determine what is missing" 18 | echo "on your system, install the appropriate package, and try this installer" 19 | echo "again." 20 | echo 21 | echo "Build dependencies include (package names may vary on your distro):" 22 | echo "${build_deps}" 23 | echo 24 | exit 1 25 | fi 26 | echo 27 | echo "Running make..." 28 | make 2>&1 | grep "error:" 29 | if [ ! -e src/udevil ]; then 30 | echo 31 | echo "make was not successful, possibly due to missing build" 32 | echo "dependencies. Examine the errors above to determine what is missing" 33 | echo "on your system, install the appropriate packages, and try this installer" 34 | echo "again. If no error is displayed, you may need to follow the manual" 35 | echo "build instructions in the README to see all of make's output." 36 | echo 37 | echo "Build dependencies include (package names may vary on your distro):" 38 | echo "${build_deps}" 39 | echo 40 | exit 1 41 | fi 42 | echo 43 | 44 | echo "udevil appears to have been built successfully. To install it, you" 45 | echo "may need to enter your root or administrator password below..." 46 | echo 47 | wh_sudo="$( which sudo 2>/dev/null )" 48 | if [ -z "$wh_sudo" ]; then 49 | echo "Running su -c \"make install\"" 50 | su -c "make install" 51 | else 52 | echo "Running sudo make install" 53 | sudo make install 54 | fi 55 | if [ $? -ne 0 ]; then 56 | echo 57 | echo "Error: make install was not successful." 58 | echo 59 | exit 1 60 | fi 61 | 62 | echo 63 | echo "Installation appears successful." 64 | echo 65 | 66 | exit 67 | 68 | -------------------------------------------------------------------------------- /install-sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # install - install a program, script, or datafile 3 | 4 | scriptversion=2011-11-20.07; # UTC 5 | 6 | # This originates from X11R5 (mit/util/scripts/install.sh), which was 7 | # later released in X11R6 (xc/config/util/install.sh) with the 8 | # following copyright and license. 9 | # 10 | # Copyright (C) 1994 X Consortium 11 | # 12 | # Permission is hereby granted, free of charge, to any person obtaining a copy 13 | # of this software and associated documentation files (the "Software"), to 14 | # deal in the Software without restriction, including without limitation the 15 | # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 16 | # sell copies of the Software, and to permit persons to whom the Software is 17 | # furnished to do so, subject to the following conditions: 18 | # 19 | # The above copyright notice and this permission notice shall be included in 20 | # all copies or substantial portions of the Software. 21 | # 22 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 | # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 26 | # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- 27 | # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 28 | # 29 | # Except as contained in this notice, the name of the X Consortium shall not 30 | # be used in advertising or otherwise to promote the sale, use or other deal- 31 | # ings in this Software without prior written authorization from the X Consor- 32 | # tium. 33 | # 34 | # 35 | # FSF changes to this file are in the public domain. 36 | # 37 | # Calling this script install-sh is preferred over install.sh, to prevent 38 | # 'make' implicit rules from creating a file called install from it 39 | # when there is no Makefile. 40 | # 41 | # This script is compatible with the BSD install script, but was written 42 | # from scratch. 43 | 44 | nl=' 45 | ' 46 | IFS=" "" $nl" 47 | 48 | # set DOITPROG to echo to test this script 49 | 50 | # Don't use :- since 4.3BSD and earlier shells don't like it. 51 | doit=${DOITPROG-} 52 | if test -z "$doit"; then 53 | doit_exec=exec 54 | else 55 | doit_exec=$doit 56 | fi 57 | 58 | # Put in absolute file names if you don't have them in your path; 59 | # or use environment vars. 60 | 61 | chgrpprog=${CHGRPPROG-chgrp} 62 | chmodprog=${CHMODPROG-chmod} 63 | chownprog=${CHOWNPROG-chown} 64 | cmpprog=${CMPPROG-cmp} 65 | cpprog=${CPPROG-cp} 66 | mkdirprog=${MKDIRPROG-mkdir} 67 | mvprog=${MVPROG-mv} 68 | rmprog=${RMPROG-rm} 69 | stripprog=${STRIPPROG-strip} 70 | 71 | posix_glob='?' 72 | initialize_posix_glob=' 73 | test "$posix_glob" != "?" || { 74 | if (set -f) 2>/dev/null; then 75 | posix_glob= 76 | else 77 | posix_glob=: 78 | fi 79 | } 80 | ' 81 | 82 | posix_mkdir= 83 | 84 | # Desired mode of installed file. 85 | mode=0755 86 | 87 | chgrpcmd= 88 | chmodcmd=$chmodprog 89 | chowncmd= 90 | mvcmd=$mvprog 91 | rmcmd="$rmprog -f" 92 | stripcmd= 93 | 94 | src= 95 | dst= 96 | dir_arg= 97 | dst_arg= 98 | 99 | copy_on_change=false 100 | no_target_directory= 101 | 102 | usage="\ 103 | Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE 104 | or: $0 [OPTION]... SRCFILES... DIRECTORY 105 | or: $0 [OPTION]... -t DIRECTORY SRCFILES... 106 | or: $0 [OPTION]... -d DIRECTORIES... 107 | 108 | In the 1st form, copy SRCFILE to DSTFILE. 109 | In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. 110 | In the 4th, create DIRECTORIES. 111 | 112 | Options: 113 | --help display this help and exit. 114 | --version display version info and exit. 115 | 116 | -c (ignored) 117 | -C install only if different (preserve the last data modification time) 118 | -d create directories instead of installing files. 119 | -g GROUP $chgrpprog installed files to GROUP. 120 | -m MODE $chmodprog installed files to MODE. 121 | -o USER $chownprog installed files to USER. 122 | -s $stripprog installed files. 123 | -t DIRECTORY install into DIRECTORY. 124 | -T report an error if DSTFILE is a directory. 125 | 126 | Environment variables override the default commands: 127 | CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG 128 | RMPROG STRIPPROG 129 | " 130 | 131 | while test $# -ne 0; do 132 | case $1 in 133 | -c) ;; 134 | 135 | -C) copy_on_change=true;; 136 | 137 | -d) dir_arg=true;; 138 | 139 | -g) chgrpcmd="$chgrpprog $2" 140 | shift;; 141 | 142 | --help) echo "$usage"; exit $?;; 143 | 144 | -m) mode=$2 145 | case $mode in 146 | *' '* | *' '* | *' 147 | '* | *'*'* | *'?'* | *'['*) 148 | echo "$0: invalid mode: $mode" >&2 149 | exit 1;; 150 | esac 151 | shift;; 152 | 153 | -o) chowncmd="$chownprog $2" 154 | shift;; 155 | 156 | -s) stripcmd=$stripprog;; 157 | 158 | -t) dst_arg=$2 159 | # Protect names problematic for 'test' and other utilities. 160 | case $dst_arg in 161 | -* | [=\(\)!]) dst_arg=./$dst_arg;; 162 | esac 163 | shift;; 164 | 165 | -T) no_target_directory=true;; 166 | 167 | --version) echo "$0 $scriptversion"; exit $?;; 168 | 169 | --) shift 170 | break;; 171 | 172 | -*) echo "$0: invalid option: $1" >&2 173 | exit 1;; 174 | 175 | *) break;; 176 | esac 177 | shift 178 | done 179 | 180 | if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then 181 | # When -d is used, all remaining arguments are directories to create. 182 | # When -t is used, the destination is already specified. 183 | # Otherwise, the last argument is the destination. Remove it from $@. 184 | for arg 185 | do 186 | if test -n "$dst_arg"; then 187 | # $@ is not empty: it contains at least $arg. 188 | set fnord "$@" "$dst_arg" 189 | shift # fnord 190 | fi 191 | shift # arg 192 | dst_arg=$arg 193 | # Protect names problematic for 'test' and other utilities. 194 | case $dst_arg in 195 | -* | [=\(\)!]) dst_arg=./$dst_arg;; 196 | esac 197 | done 198 | fi 199 | 200 | if test $# -eq 0; then 201 | if test -z "$dir_arg"; then 202 | echo "$0: no input file specified." >&2 203 | exit 1 204 | fi 205 | # It's OK to call 'install-sh -d' without argument. 206 | # This can happen when creating conditional directories. 207 | exit 0 208 | fi 209 | 210 | if test -z "$dir_arg"; then 211 | do_exit='(exit $ret); exit $ret' 212 | trap "ret=129; $do_exit" 1 213 | trap "ret=130; $do_exit" 2 214 | trap "ret=141; $do_exit" 13 215 | trap "ret=143; $do_exit" 15 216 | 217 | # Set umask so as not to create temps with too-generous modes. 218 | # However, 'strip' requires both read and write access to temps. 219 | case $mode in 220 | # Optimize common cases. 221 | *644) cp_umask=133;; 222 | *755) cp_umask=22;; 223 | 224 | *[0-7]) 225 | if test -z "$stripcmd"; then 226 | u_plus_rw= 227 | else 228 | u_plus_rw='% 200' 229 | fi 230 | cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; 231 | *) 232 | if test -z "$stripcmd"; then 233 | u_plus_rw= 234 | else 235 | u_plus_rw=,u+rw 236 | fi 237 | cp_umask=$mode$u_plus_rw;; 238 | esac 239 | fi 240 | 241 | for src 242 | do 243 | # Protect names problematic for 'test' and other utilities. 244 | case $src in 245 | -* | [=\(\)!]) src=./$src;; 246 | esac 247 | 248 | if test -n "$dir_arg"; then 249 | dst=$src 250 | dstdir=$dst 251 | test -d "$dstdir" 252 | dstdir_status=$? 253 | else 254 | 255 | # Waiting for this to be detected by the "$cpprog $src $dsttmp" command 256 | # might cause directories to be created, which would be especially bad 257 | # if $src (and thus $dsttmp) contains '*'. 258 | if test ! -f "$src" && test ! -d "$src"; then 259 | echo "$0: $src does not exist." >&2 260 | exit 1 261 | fi 262 | 263 | if test -z "$dst_arg"; then 264 | echo "$0: no destination specified." >&2 265 | exit 1 266 | fi 267 | dst=$dst_arg 268 | 269 | # If destination is a directory, append the input filename; won't work 270 | # if double slashes aren't ignored. 271 | if test -d "$dst"; then 272 | if test -n "$no_target_directory"; then 273 | echo "$0: $dst_arg: Is a directory" >&2 274 | exit 1 275 | fi 276 | dstdir=$dst 277 | dst=$dstdir/`basename "$src"` 278 | dstdir_status=0 279 | else 280 | # Prefer dirname, but fall back on a substitute if dirname fails. 281 | dstdir=` 282 | (dirname "$dst") 2>/dev/null || 283 | expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 284 | X"$dst" : 'X\(//\)[^/]' \| \ 285 | X"$dst" : 'X\(//\)$' \| \ 286 | X"$dst" : 'X\(/\)' \| . 2>/dev/null || 287 | echo X"$dst" | 288 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 289 | s//\1/ 290 | q 291 | } 292 | /^X\(\/\/\)[^/].*/{ 293 | s//\1/ 294 | q 295 | } 296 | /^X\(\/\/\)$/{ 297 | s//\1/ 298 | q 299 | } 300 | /^X\(\/\).*/{ 301 | s//\1/ 302 | q 303 | } 304 | s/.*/./; q' 305 | ` 306 | 307 | test -d "$dstdir" 308 | dstdir_status=$? 309 | fi 310 | fi 311 | 312 | obsolete_mkdir_used=false 313 | 314 | if test $dstdir_status != 0; then 315 | case $posix_mkdir in 316 | '') 317 | # Create intermediate dirs using mode 755 as modified by the umask. 318 | # This is like FreeBSD 'install' as of 1997-10-28. 319 | umask=`umask` 320 | case $stripcmd.$umask in 321 | # Optimize common cases. 322 | *[2367][2367]) mkdir_umask=$umask;; 323 | .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; 324 | 325 | *[0-7]) 326 | mkdir_umask=`expr $umask + 22 \ 327 | - $umask % 100 % 40 + $umask % 20 \ 328 | - $umask % 10 % 4 + $umask % 2 329 | `;; 330 | *) mkdir_umask=$umask,go-w;; 331 | esac 332 | 333 | # With -d, create the new directory with the user-specified mode. 334 | # Otherwise, rely on $mkdir_umask. 335 | if test -n "$dir_arg"; then 336 | mkdir_mode=-m$mode 337 | else 338 | mkdir_mode= 339 | fi 340 | 341 | posix_mkdir=false 342 | case $umask in 343 | *[123567][0-7][0-7]) 344 | # POSIX mkdir -p sets u+wx bits regardless of umask, which 345 | # is incompatible with FreeBSD 'install' when (umask & 300) != 0. 346 | ;; 347 | *) 348 | tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ 349 | trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 350 | 351 | if (umask $mkdir_umask && 352 | exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 353 | then 354 | if test -z "$dir_arg" || { 355 | # Check for POSIX incompatibilities with -m. 356 | # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or 357 | # other-writable bit of parent directory when it shouldn't. 358 | # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. 359 | ls_ld_tmpdir=`ls -ld "$tmpdir"` 360 | case $ls_ld_tmpdir in 361 | d????-?r-*) different_mode=700;; 362 | d????-?--*) different_mode=755;; 363 | *) false;; 364 | esac && 365 | $mkdirprog -m$different_mode -p -- "$tmpdir" && { 366 | ls_ld_tmpdir_1=`ls -ld "$tmpdir"` 367 | test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" 368 | } 369 | } 370 | then posix_mkdir=: 371 | fi 372 | rmdir "$tmpdir/d" "$tmpdir" 373 | else 374 | # Remove any dirs left behind by ancient mkdir implementations. 375 | rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null 376 | fi 377 | trap '' 0;; 378 | esac;; 379 | esac 380 | 381 | if 382 | $posix_mkdir && ( 383 | umask $mkdir_umask && 384 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" 385 | ) 386 | then : 387 | else 388 | 389 | # The umask is ridiculous, or mkdir does not conform to POSIX, 390 | # or it failed possibly due to a race condition. Create the 391 | # directory the slow way, step by step, checking for races as we go. 392 | 393 | case $dstdir in 394 | /*) prefix='/';; 395 | [-=\(\)!]*) prefix='./';; 396 | *) prefix='';; 397 | esac 398 | 399 | eval "$initialize_posix_glob" 400 | 401 | oIFS=$IFS 402 | IFS=/ 403 | $posix_glob set -f 404 | set fnord $dstdir 405 | shift 406 | $posix_glob set +f 407 | IFS=$oIFS 408 | 409 | prefixes= 410 | 411 | for d 412 | do 413 | test X"$d" = X && continue 414 | 415 | prefix=$prefix$d 416 | if test -d "$prefix"; then 417 | prefixes= 418 | else 419 | if $posix_mkdir; then 420 | (umask=$mkdir_umask && 421 | $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break 422 | # Don't fail if two instances are running concurrently. 423 | test -d "$prefix" || exit 1 424 | else 425 | case $prefix in 426 | *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; 427 | *) qprefix=$prefix;; 428 | esac 429 | prefixes="$prefixes '$qprefix'" 430 | fi 431 | fi 432 | prefix=$prefix/ 433 | done 434 | 435 | if test -n "$prefixes"; then 436 | # Don't fail if two instances are running concurrently. 437 | (umask $mkdir_umask && 438 | eval "\$doit_exec \$mkdirprog $prefixes") || 439 | test -d "$dstdir" || exit 1 440 | obsolete_mkdir_used=true 441 | fi 442 | fi 443 | fi 444 | 445 | if test -n "$dir_arg"; then 446 | { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && 447 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && 448 | { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || 449 | test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 450 | else 451 | 452 | # Make a couple of temp file names in the proper directory. 453 | dsttmp=$dstdir/_inst.$$_ 454 | rmtmp=$dstdir/_rm.$$_ 455 | 456 | # Trap to clean up those temp files at exit. 457 | trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 458 | 459 | # Copy the file name to the temp name. 460 | (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && 461 | 462 | # and set any options; do chmod last to preserve setuid bits. 463 | # 464 | # If any of these fail, we abort the whole thing. If we want to 465 | # ignore errors from any of these, just make sure not to ignore 466 | # errors from the above "$doit $cpprog $src $dsttmp" command. 467 | # 468 | { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && 469 | { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && 470 | { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && 471 | { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && 472 | 473 | # If -C, don't bother to copy if it wouldn't change the file. 474 | if $copy_on_change && 475 | old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && 476 | new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && 477 | 478 | eval "$initialize_posix_glob" && 479 | $posix_glob set -f && 480 | set X $old && old=:$2:$4:$5:$6 && 481 | set X $new && new=:$2:$4:$5:$6 && 482 | $posix_glob set +f && 483 | 484 | test "$old" = "$new" && 485 | $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 486 | then 487 | rm -f "$dsttmp" 488 | else 489 | # Rename the file to the real destination. 490 | $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || 491 | 492 | # The rename failed, perhaps because mv can't rename something else 493 | # to itself, or perhaps because mv is so ancient that it does not 494 | # support -f. 495 | { 496 | # Now remove or move aside any old file at destination location. 497 | # We try this two ways since rm can't unlink itself on some 498 | # systems and the destination file might be busy for other 499 | # reasons. In this case, the final cleanup might fail but the new 500 | # file should still install successfully. 501 | { 502 | test ! -f "$dst" || 503 | $doit $rmcmd -f "$dst" 2>/dev/null || 504 | { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && 505 | { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } 506 | } || 507 | { echo "$0: cannot unlink or rename $dst" >&2 508 | (exit 1); exit 1 509 | } 510 | } && 511 | 512 | # Now rename the file to the real destination. 513 | $doit $mvcmd "$dsttmp" "$dst" 514 | } 515 | fi || exit 1 516 | 517 | trap '' 0 518 | fi 519 | done 520 | 521 | # Local variables: 522 | # eval: (add-hook 'write-file-hooks 'time-stamp) 523 | # time-stamp-start: "scriptversion=" 524 | # time-stamp-format: "%:y-%02m-%02d.%02H" 525 | # time-stamp-time-zone: "UTC" 526 | # time-stamp-end: "; # UTC" 527 | # End: 528 | -------------------------------------------------------------------------------- /intltool-extract.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IgnorantGuru/udevil/ce9f1c5f811e34913b050aed193a39a63ac81e73/intltool-extract.in -------------------------------------------------------------------------------- /intltool-merge.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IgnorantGuru/udevil/ce9f1c5f811e34913b050aed193a39a63ac81e73/intltool-merge.in -------------------------------------------------------------------------------- /intltool-update.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IgnorantGuru/udevil/ce9f1c5f811e34913b050aed193a39a63ac81e73/intltool-update.in -------------------------------------------------------------------------------- /man/Makefile.am: -------------------------------------------------------------------------------- 1 | man_MANS = \ 2 | udevil.1 3 | 4 | EXTRA_DIST = $(man_MANS) 5 | -------------------------------------------------------------------------------- /man/Makefile.in: -------------------------------------------------------------------------------- 1 | # Makefile.in generated by automake 1.14.1 from Makefile.am. 2 | # @configure_input@ 3 | 4 | # Copyright (C) 1994-2013 Free Software Foundation, Inc. 5 | 6 | # This Makefile.in is free software; the Free Software Foundation 7 | # gives unlimited permission to copy and/or distribute it, 8 | # with or without modifications, as long as this notice is preserved. 9 | 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13 | # PARTICULAR PURPOSE. 14 | 15 | @SET_MAKE@ 16 | VPATH = @srcdir@ 17 | am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 18 | am__make_running_with_option = \ 19 | case $${target_option-} in \ 20 | ?) ;; \ 21 | *) echo "am__make_running_with_option: internal error: invalid" \ 22 | "target option '$${target_option-}' specified" >&2; \ 23 | exit 1;; \ 24 | esac; \ 25 | has_opt=no; \ 26 | sane_makeflags=$$MAKEFLAGS; \ 27 | if $(am__is_gnu_make); then \ 28 | sane_makeflags=$$MFLAGS; \ 29 | else \ 30 | case $$MAKEFLAGS in \ 31 | *\\[\ \ ]*) \ 32 | bs=\\; \ 33 | sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ 34 | | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ 35 | esac; \ 36 | fi; \ 37 | skip_next=no; \ 38 | strip_trailopt () \ 39 | { \ 40 | flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ 41 | }; \ 42 | for flg in $$sane_makeflags; do \ 43 | test $$skip_next = yes && { skip_next=no; continue; }; \ 44 | case $$flg in \ 45 | *=*|--*) continue;; \ 46 | -*I) strip_trailopt 'I'; skip_next=yes;; \ 47 | -*I?*) strip_trailopt 'I';; \ 48 | -*O) strip_trailopt 'O'; skip_next=yes;; \ 49 | -*O?*) strip_trailopt 'O';; \ 50 | -*l) strip_trailopt 'l'; skip_next=yes;; \ 51 | -*l?*) strip_trailopt 'l';; \ 52 | -[dEDm]) skip_next=yes;; \ 53 | -[JT]) skip_next=yes;; \ 54 | esac; \ 55 | case $$flg in \ 56 | *$$target_option*) has_opt=yes; break;; \ 57 | esac; \ 58 | done; \ 59 | test $$has_opt = yes 60 | am__make_dryrun = (target_option=n; $(am__make_running_with_option)) 61 | am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) 62 | pkgdatadir = $(datadir)/@PACKAGE@ 63 | pkgincludedir = $(includedir)/@PACKAGE@ 64 | pkglibdir = $(libdir)/@PACKAGE@ 65 | pkglibexecdir = $(libexecdir)/@PACKAGE@ 66 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd 67 | install_sh_DATA = $(install_sh) -c -m 644 68 | install_sh_PROGRAM = $(install_sh) -c 69 | install_sh_SCRIPT = $(install_sh) -c 70 | INSTALL_HEADER = $(INSTALL_DATA) 71 | transform = $(program_transform_name) 72 | NORMAL_INSTALL = : 73 | PRE_INSTALL = : 74 | POST_INSTALL = : 75 | NORMAL_UNINSTALL = : 76 | PRE_UNINSTALL = : 77 | POST_UNINSTALL = : 78 | build_triplet = @build@ 79 | host_triplet = @host@ 80 | subdir = man 81 | DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ 82 | $(top_srcdir)/mkinstalldirs 83 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 84 | am__aclocal_m4_deps = $(top_srcdir)/configure.ac 85 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ 86 | $(ACLOCAL_M4) 87 | mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs 88 | CONFIG_HEADER = $(top_builddir)/config.h 89 | CONFIG_CLEAN_FILES = 90 | CONFIG_CLEAN_VPATH_FILES = 91 | AM_V_P = $(am__v_P_@AM_V@) 92 | am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) 93 | am__v_P_0 = false 94 | am__v_P_1 = : 95 | AM_V_GEN = $(am__v_GEN_@AM_V@) 96 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) 97 | am__v_GEN_0 = @echo " GEN " $@; 98 | am__v_GEN_1 = 99 | AM_V_at = $(am__v_at_@AM_V@) 100 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) 101 | am__v_at_0 = @ 102 | am__v_at_1 = 103 | SOURCES = 104 | DIST_SOURCES = 105 | am__can_run_installinfo = \ 106 | case $$AM_UPDATE_INFO_DIR in \ 107 | n|no|NO) false;; \ 108 | *) (install-info --version) >/dev/null 2>&1;; \ 109 | esac 110 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; 111 | am__vpath_adj = case $$p in \ 112 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ 113 | *) f=$$p;; \ 114 | esac; 115 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; 116 | am__install_max = 40 117 | am__nobase_strip_setup = \ 118 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` 119 | am__nobase_strip = \ 120 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" 121 | am__nobase_list = $(am__nobase_strip_setup); \ 122 | for p in $$list; do echo "$$p $$p"; done | \ 123 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ 124 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ 125 | if (++n[$$2] == $(am__install_max)) \ 126 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ 127 | END { for (dir in files) print dir, files[dir] }' 128 | am__base_list = \ 129 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ 130 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' 131 | am__uninstall_files_from_dir = { \ 132 | test -z "$$files" \ 133 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ 134 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ 135 | $(am__cd) "$$dir" && rm -f $$files; }; \ 136 | } 137 | man1dir = $(mandir)/man1 138 | am__installdirs = "$(DESTDIR)$(man1dir)" 139 | NROFF = nroff 140 | MANS = $(man_MANS) 141 | am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) 142 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) 143 | ACLOCAL = @ACLOCAL@ 144 | ALL_LINGUAS = @ALL_LINGUAS@ 145 | AMTAR = @AMTAR@ 146 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 147 | AR = @AR@ 148 | AUTOCONF = @AUTOCONF@ 149 | AUTOHEADER = @AUTOHEADER@ 150 | AUTOMAKE = @AUTOMAKE@ 151 | AWK = @AWK@ 152 | CATALOGS = @CATALOGS@ 153 | CATOBJEXT = @CATOBJEXT@ 154 | CC = @CC@ 155 | CCDEPMODE = @CCDEPMODE@ 156 | CFLAGS = @CFLAGS@ 157 | CPP = @CPP@ 158 | CPPFLAGS = @CPPFLAGS@ 159 | CYGPATH_W = @CYGPATH_W@ 160 | DATADIRNAME = @DATADIRNAME@ 161 | DEFS = @DEFS@ 162 | DEPDIR = @DEPDIR@ 163 | DLLTOOL = @DLLTOOL@ 164 | DSYMUTIL = @DSYMUTIL@ 165 | DUMPBIN = @DUMPBIN@ 166 | ECHO_C = @ECHO_C@ 167 | ECHO_N = @ECHO_N@ 168 | ECHO_T = @ECHO_T@ 169 | EGREP = @EGREP@ 170 | EXEEXT = @EXEEXT@ 171 | FGREP = @FGREP@ 172 | GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 173 | GLIB_CFLAGS = @GLIB_CFLAGS@ 174 | GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ 175 | GLIB_LIBS = @GLIB_LIBS@ 176 | GMOFILES = @GMOFILES@ 177 | GMSGFMT = @GMSGFMT@ 178 | GREP = @GREP@ 179 | INSTALL = @INSTALL@ 180 | INSTALL_DATA = @INSTALL_DATA@ 181 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ 182 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ 183 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ 184 | INSTOBJEXT = @INSTOBJEXT@ 185 | INTLLIBS = @INTLLIBS@ 186 | INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 187 | INTLTOOL_MERGE = @INTLTOOL_MERGE@ 188 | INTLTOOL_PERL = @INTLTOOL_PERL@ 189 | INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 190 | INTLTOOL_V_MERGE = @INTLTOOL_V_MERGE@ 191 | INTLTOOL_V_MERGE_OPTIONS = @INTLTOOL_V_MERGE_OPTIONS@ 192 | INTLTOOL__v_MERGE_ = @INTLTOOL__v_MERGE_@ 193 | INTLTOOL__v_MERGE_0 = @INTLTOOL__v_MERGE_0@ 194 | LD = @LD@ 195 | LDFLAGS = @LDFLAGS@ 196 | LIBOBJS = @LIBOBJS@ 197 | LIBS = @LIBS@ 198 | LIBTOOL = @LIBTOOL@ 199 | LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ 200 | LIBUDEV_LIBS = @LIBUDEV_LIBS@ 201 | LIPO = @LIPO@ 202 | LN_S = @LN_S@ 203 | LTLIBOBJS = @LTLIBOBJS@ 204 | MAINT = @MAINT@ 205 | MAKEINFO = @MAKEINFO@ 206 | MANIFEST_TOOL = @MANIFEST_TOOL@ 207 | MKDIR_P = @MKDIR_P@ 208 | MKINSTALLDIRS = @MKINSTALLDIRS@ 209 | MSGFMT = @MSGFMT@ 210 | MSGFMT_OPTS = @MSGFMT_OPTS@ 211 | MSGMERGE = @MSGMERGE@ 212 | NM = @NM@ 213 | NMEDIT = @NMEDIT@ 214 | OBJDUMP = @OBJDUMP@ 215 | OBJEXT = @OBJEXT@ 216 | OTOOL = @OTOOL@ 217 | OTOOL64 = @OTOOL64@ 218 | PACKAGE = @PACKAGE@ 219 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ 220 | PACKAGE_NAME = @PACKAGE_NAME@ 221 | PACKAGE_STRING = @PACKAGE_STRING@ 222 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ 223 | PACKAGE_URL = @PACKAGE_URL@ 224 | PACKAGE_VERSION = @PACKAGE_VERSION@ 225 | PATH_SEPARATOR = @PATH_SEPARATOR@ 226 | PKG_CONFIG = @PKG_CONFIG@ 227 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ 228 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 229 | POFILES = @POFILES@ 230 | POSUB = @POSUB@ 231 | PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ 232 | PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ 233 | RANLIB = @RANLIB@ 234 | SED = @SED@ 235 | SET_MAKE = @SET_MAKE@ 236 | SHELL = @SHELL@ 237 | STRIP = @STRIP@ 238 | USE_NLS = @USE_NLS@ 239 | VERSION = @VERSION@ 240 | XGETTEXT = @XGETTEXT@ 241 | abs_builddir = @abs_builddir@ 242 | abs_srcdir = @abs_srcdir@ 243 | abs_top_builddir = @abs_top_builddir@ 244 | abs_top_srcdir = @abs_top_srcdir@ 245 | ac_ct_AR = @ac_ct_AR@ 246 | ac_ct_CC = @ac_ct_CC@ 247 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 248 | am__include = @am__include@ 249 | am__leading_dot = @am__leading_dot@ 250 | am__quote = @am__quote@ 251 | am__tar = @am__tar@ 252 | am__untar = @am__untar@ 253 | bindir = @bindir@ 254 | build = @build@ 255 | build_alias = @build_alias@ 256 | build_cpu = @build_cpu@ 257 | build_os = @build_os@ 258 | build_vendor = @build_vendor@ 259 | builddir = @builddir@ 260 | datadir = @datadir@ 261 | datarootdir = @datarootdir@ 262 | docdir = @docdir@ 263 | dvidir = @dvidir@ 264 | exec_prefix = @exec_prefix@ 265 | host = @host@ 266 | host_alias = @host_alias@ 267 | host_cpu = @host_cpu@ 268 | host_os = @host_os@ 269 | host_vendor = @host_vendor@ 270 | htmldir = @htmldir@ 271 | includedir = @includedir@ 272 | infodir = @infodir@ 273 | install_sh = @install_sh@ 274 | intltool__v_merge_options_ = @intltool__v_merge_options_@ 275 | intltool__v_merge_options_0 = @intltool__v_merge_options_0@ 276 | libdir = @libdir@ 277 | libexecdir = @libexecdir@ 278 | localedir = @localedir@ 279 | localstatedir = @localstatedir@ 280 | mandir = @mandir@ 281 | mkdir_p = @mkdir_p@ 282 | oldincludedir = @oldincludedir@ 283 | pdfdir = @pdfdir@ 284 | prefix = @prefix@ 285 | program_transform_name = @program_transform_name@ 286 | psdir = @psdir@ 287 | sbindir = @sbindir@ 288 | sharedstatedir = @sharedstatedir@ 289 | srcdir = @srcdir@ 290 | sysconfdir = @sysconfdir@ 291 | target_alias = @target_alias@ 292 | top_build_prefix = @top_build_prefix@ 293 | top_builddir = @top_builddir@ 294 | top_srcdir = @top_srcdir@ 295 | man_MANS = \ 296 | udevil.1 297 | 298 | EXTRA_DIST = $(man_MANS) 299 | all: all-am 300 | 301 | .SUFFIXES: 302 | $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) 303 | @for dep in $?; do \ 304 | case '$(am__configure_deps)' in \ 305 | *$$dep*) \ 306 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ 307 | && { if test -f $@; then exit 0; else break; fi; }; \ 308 | exit 1;; \ 309 | esac; \ 310 | done; \ 311 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ 312 | $(am__cd) $(top_srcdir) && \ 313 | $(AUTOMAKE) --gnu man/Makefile 314 | .PRECIOUS: Makefile 315 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 316 | @case '$?' in \ 317 | *config.status*) \ 318 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ 319 | *) \ 320 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ 321 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ 322 | esac; 323 | 324 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) 325 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 326 | 327 | $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 328 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 329 | $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) 330 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh 331 | $(am__aclocal_m4_deps): 332 | 333 | mostlyclean-libtool: 334 | -rm -f *.lo 335 | 336 | clean-libtool: 337 | -rm -rf .libs _libs 338 | install-man1: $(man_MANS) 339 | @$(NORMAL_INSTALL) 340 | @list1=''; \ 341 | list2='$(man_MANS)'; \ 342 | test -n "$(man1dir)" \ 343 | && test -n "`echo $$list1$$list2`" \ 344 | || exit 0; \ 345 | echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ 346 | $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ 347 | { for i in $$list1; do echo "$$i"; done; \ 348 | if test -n "$$list2"; then \ 349 | for i in $$list2; do echo "$$i"; done \ 350 | | sed -n '/\.1[a-z]*$$/p'; \ 351 | fi; \ 352 | } | while read p; do \ 353 | if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ 354 | echo "$$d$$p"; echo "$$p"; \ 355 | done | \ 356 | sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 357 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ 358 | sed 'N;N;s,\n, ,g' | { \ 359 | list=; while read file base inst; do \ 360 | if test "$$base" = "$$inst"; then list="$$list $$file"; else \ 361 | echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ 362 | $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ 363 | fi; \ 364 | done; \ 365 | for i in $$list; do echo "$$i"; done | $(am__base_list) | \ 366 | while read files; do \ 367 | test -z "$$files" || { \ 368 | echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ 369 | $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ 370 | done; } 371 | 372 | uninstall-man1: 373 | @$(NORMAL_UNINSTALL) 374 | @list=''; test -n "$(man1dir)" || exit 0; \ 375 | files=`{ for i in $$list; do echo "$$i"; done; \ 376 | l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ 377 | sed -n '/\.1[a-z]*$$/p'; \ 378 | } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ 379 | -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ 380 | dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) 381 | tags TAGS: 382 | 383 | ctags CTAGS: 384 | 385 | cscope cscopelist: 386 | 387 | 388 | distdir: $(DISTFILES) 389 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 390 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ 391 | list='$(DISTFILES)'; \ 392 | dist_files=`for file in $$list; do echo $$file; done | \ 393 | sed -e "s|^$$srcdirstrip/||;t" \ 394 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ 395 | case $$dist_files in \ 396 | */*) $(MKDIR_P) `echo "$$dist_files" | \ 397 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ 398 | sort -u` ;; \ 399 | esac; \ 400 | for file in $$dist_files; do \ 401 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ 402 | if test -d $$d/$$file; then \ 403 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ 404 | if test -d "$(distdir)/$$file"; then \ 405 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 406 | fi; \ 407 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ 408 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ 409 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ 410 | fi; \ 411 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ 412 | else \ 413 | test -f "$(distdir)/$$file" \ 414 | || cp -p $$d/$$file "$(distdir)/$$file" \ 415 | || exit 1; \ 416 | fi; \ 417 | done 418 | check-am: all-am 419 | check: check-am 420 | all-am: Makefile $(MANS) 421 | installdirs: 422 | for dir in "$(DESTDIR)$(man1dir)"; do \ 423 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ 424 | done 425 | install: install-am 426 | install-exec: install-exec-am 427 | install-data: install-data-am 428 | uninstall: uninstall-am 429 | 430 | install-am: all-am 431 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am 432 | 433 | installcheck: installcheck-am 434 | install-strip: 435 | if test -z '$(STRIP)'; then \ 436 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 437 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 438 | install; \ 439 | else \ 440 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ 441 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ 442 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ 443 | fi 444 | mostlyclean-generic: 445 | 446 | clean-generic: 447 | 448 | distclean-generic: 449 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 450 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) 451 | 452 | maintainer-clean-generic: 453 | @echo "This command is intended for maintainers to use" 454 | @echo "it deletes files that may require special tools to rebuild." 455 | clean: clean-am 456 | 457 | clean-am: clean-generic clean-libtool mostlyclean-am 458 | 459 | distclean: distclean-am 460 | -rm -f Makefile 461 | distclean-am: clean-am distclean-generic 462 | 463 | dvi: dvi-am 464 | 465 | dvi-am: 466 | 467 | html: html-am 468 | 469 | html-am: 470 | 471 | info: info-am 472 | 473 | info-am: 474 | 475 | install-data-am: install-man 476 | 477 | install-dvi: install-dvi-am 478 | 479 | install-dvi-am: 480 | 481 | install-exec-am: 482 | 483 | install-html: install-html-am 484 | 485 | install-html-am: 486 | 487 | install-info: install-info-am 488 | 489 | install-info-am: 490 | 491 | install-man: install-man1 492 | 493 | install-pdf: install-pdf-am 494 | 495 | install-pdf-am: 496 | 497 | install-ps: install-ps-am 498 | 499 | install-ps-am: 500 | 501 | installcheck-am: 502 | 503 | maintainer-clean: maintainer-clean-am 504 | -rm -f Makefile 505 | maintainer-clean-am: distclean-am maintainer-clean-generic 506 | 507 | mostlyclean: mostlyclean-am 508 | 509 | mostlyclean-am: mostlyclean-generic mostlyclean-libtool 510 | 511 | pdf: pdf-am 512 | 513 | pdf-am: 514 | 515 | ps: ps-am 516 | 517 | ps-am: 518 | 519 | uninstall-am: uninstall-man 520 | 521 | uninstall-man: uninstall-man1 522 | 523 | .MAKE: install-am install-strip 524 | 525 | .PHONY: all all-am check check-am clean clean-generic clean-libtool \ 526 | cscopelist-am ctags-am distclean distclean-generic \ 527 | distclean-libtool distdir dvi dvi-am html html-am info info-am \ 528 | install install-am install-data install-data-am install-dvi \ 529 | install-dvi-am install-exec install-exec-am install-html \ 530 | install-html-am install-info install-info-am install-man \ 531 | install-man1 install-pdf install-pdf-am install-ps \ 532 | install-ps-am install-strip installcheck installcheck-am \ 533 | installdirs maintainer-clean maintainer-clean-generic \ 534 | mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ 535 | ps ps-am tags-am uninstall uninstall-am uninstall-man \ 536 | uninstall-man1 537 | 538 | 539 | # Tell versions [3.59,3.63) of GNU make to not export all variables. 540 | # Otherwise a system limit (for SysV at least) may be exceeded. 541 | .NOEXPORT: 542 | -------------------------------------------------------------------------------- /man/udevil.1: -------------------------------------------------------------------------------- 1 | .TH udevil 1 "May 18 2012" "IgnorantGuru" 2 | 3 | .SH NAME 4 | udevil \- mount, unmount, and monitor devices as a normal user 5 | 6 | 7 | .SH AUTHOR 8 | .B udevil 9 | is developed and maintained by IgnorantGuru . 10 | -------------------------------------------------------------------------------- /missing: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # Common wrapper for a few potentially missing GNU programs. 3 | 4 | scriptversion=2013-10-28.13; # UTC 5 | 6 | # Copyright (C) 1996-2013 Free Software Foundation, Inc. 7 | # Originally written by Fran,cois Pinard , 1996. 8 | 9 | # This program is free software; you can redistribute it and/or modify 10 | # it under the terms of the GNU General Public License as published by 11 | # the Free Software Foundation; either version 2, or (at your option) 12 | # any later version. 13 | 14 | # This program is distributed in the hope that it will be useful, 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | # GNU General Public License for more details. 18 | 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | # As a special exception to the GNU General Public License, if you 23 | # distribute this file as part of a program that contains a 24 | # configuration script generated by Autoconf, you may include it under 25 | # the same distribution terms that you use for the rest of that program. 26 | 27 | if test $# -eq 0; then 28 | echo 1>&2 "Try '$0 --help' for more information" 29 | exit 1 30 | fi 31 | 32 | case $1 in 33 | 34 | --is-lightweight) 35 | # Used by our autoconf macros to check whether the available missing 36 | # script is modern enough. 37 | exit 0 38 | ;; 39 | 40 | --run) 41 | # Back-compat with the calling convention used by older automake. 42 | shift 43 | ;; 44 | 45 | -h|--h|--he|--hel|--help) 46 | echo "\ 47 | $0 [OPTION]... PROGRAM [ARGUMENT]... 48 | 49 | Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due 50 | to PROGRAM being missing or too old. 51 | 52 | Options: 53 | -h, --help display this help and exit 54 | -v, --version output version information and exit 55 | 56 | Supported PROGRAM values: 57 | aclocal autoconf autoheader autom4te automake makeinfo 58 | bison yacc flex lex help2man 59 | 60 | Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 61 | 'g' are ignored when checking the name. 62 | 63 | Send bug reports to ." 64 | exit $? 65 | ;; 66 | 67 | -v|--v|--ve|--ver|--vers|--versi|--versio|--version) 68 | echo "missing $scriptversion (GNU Automake)" 69 | exit $? 70 | ;; 71 | 72 | -*) 73 | echo 1>&2 "$0: unknown '$1' option" 74 | echo 1>&2 "Try '$0 --help' for more information" 75 | exit 1 76 | ;; 77 | 78 | esac 79 | 80 | # Run the given program, remember its exit status. 81 | "$@"; st=$? 82 | 83 | # If it succeeded, we are done. 84 | test $st -eq 0 && exit 0 85 | 86 | # Also exit now if we it failed (or wasn't found), and '--version' was 87 | # passed; such an option is passed most likely to detect whether the 88 | # program is present and works. 89 | case $2 in --version|--help) exit $st;; esac 90 | 91 | # Exit code 63 means version mismatch. This often happens when the user 92 | # tries to use an ancient version of a tool on a file that requires a 93 | # minimum version. 94 | if test $st -eq 63; then 95 | msg="probably too old" 96 | elif test $st -eq 127; then 97 | # Program was missing. 98 | msg="missing on your system" 99 | else 100 | # Program was found and executed, but failed. Give up. 101 | exit $st 102 | fi 103 | 104 | perl_URL=http://www.perl.org/ 105 | flex_URL=http://flex.sourceforge.net/ 106 | gnu_software_URL=http://www.gnu.org/software 107 | 108 | program_details () 109 | { 110 | case $1 in 111 | aclocal|automake) 112 | echo "The '$1' program is part of the GNU Automake package:" 113 | echo "<$gnu_software_URL/automake>" 114 | echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" 115 | echo "<$gnu_software_URL/autoconf>" 116 | echo "<$gnu_software_URL/m4/>" 117 | echo "<$perl_URL>" 118 | ;; 119 | autoconf|autom4te|autoheader) 120 | echo "The '$1' program is part of the GNU Autoconf package:" 121 | echo "<$gnu_software_URL/autoconf/>" 122 | echo "It also requires GNU m4 and Perl in order to run:" 123 | echo "<$gnu_software_URL/m4/>" 124 | echo "<$perl_URL>" 125 | ;; 126 | esac 127 | } 128 | 129 | give_advice () 130 | { 131 | # Normalize program name to check for. 132 | normalized_program=`echo "$1" | sed ' 133 | s/^gnu-//; t 134 | s/^gnu//; t 135 | s/^g//; t'` 136 | 137 | printf '%s\n' "'$1' is $msg." 138 | 139 | configure_deps="'configure.ac' or m4 files included by 'configure.ac'" 140 | case $normalized_program in 141 | autoconf*) 142 | echo "You should only need it if you modified 'configure.ac'," 143 | echo "or m4 files included by it." 144 | program_details 'autoconf' 145 | ;; 146 | autoheader*) 147 | echo "You should only need it if you modified 'acconfig.h' or" 148 | echo "$configure_deps." 149 | program_details 'autoheader' 150 | ;; 151 | automake*) 152 | echo "You should only need it if you modified 'Makefile.am' or" 153 | echo "$configure_deps." 154 | program_details 'automake' 155 | ;; 156 | aclocal*) 157 | echo "You should only need it if you modified 'acinclude.m4' or" 158 | echo "$configure_deps." 159 | program_details 'aclocal' 160 | ;; 161 | autom4te*) 162 | echo "You might have modified some maintainer files that require" 163 | echo "the 'autom4te' program to be rebuilt." 164 | program_details 'autom4te' 165 | ;; 166 | bison*|yacc*) 167 | echo "You should only need it if you modified a '.y' file." 168 | echo "You may want to install the GNU Bison package:" 169 | echo "<$gnu_software_URL/bison/>" 170 | ;; 171 | lex*|flex*) 172 | echo "You should only need it if you modified a '.l' file." 173 | echo "You may want to install the Fast Lexical Analyzer package:" 174 | echo "<$flex_URL>" 175 | ;; 176 | help2man*) 177 | echo "You should only need it if you modified a dependency" \ 178 | "of a man page." 179 | echo "You may want to install the GNU Help2man package:" 180 | echo "<$gnu_software_URL/help2man/>" 181 | ;; 182 | makeinfo*) 183 | echo "You should only need it if you modified a '.texi' file, or" 184 | echo "any other file indirectly affecting the aspect of the manual." 185 | echo "You might want to install the Texinfo package:" 186 | echo "<$gnu_software_URL/texinfo/>" 187 | echo "The spurious makeinfo call might also be the consequence of" 188 | echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" 189 | echo "want to install GNU make:" 190 | echo "<$gnu_software_URL/make/>" 191 | ;; 192 | *) 193 | echo "You might have modified some files without having the proper" 194 | echo "tools for further handling them. Check the 'README' file, it" 195 | echo "often tells you about the needed prerequisites for installing" 196 | echo "this package. You may also peek at any GNU archive site, in" 197 | echo "case some other package contains this missing '$1' program." 198 | ;; 199 | esac 200 | } 201 | 202 | give_advice "$1" | sed -e '1s/^/WARNING: /' \ 203 | -e '2,$s/^/ /' >&2 204 | 205 | # Propagate the correct exit status (expected to be 127 for a program 206 | # not found, 63 for a program that failed due to version mismatch). 207 | exit $st 208 | 209 | # Local variables: 210 | # eval: (add-hook 'write-file-hooks 'time-stamp) 211 | # time-stamp-start: "scriptversion=" 212 | # time-stamp-format: "%:y-%02m-%02d.%02H" 213 | # time-stamp-time-zone: "UTC" 214 | # time-stamp-end: "; # UTC" 215 | # End: 216 | -------------------------------------------------------------------------------- /mkinstalldirs: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # mkinstalldirs --- make directory hierarchy 3 | 4 | scriptversion=2009-04-28.21; # UTC 5 | 6 | # Original author: Noah Friedman 7 | # Created: 1993-05-16 8 | # Public domain. 9 | # 10 | # This file is maintained in Automake, please report 11 | # bugs to or send patches to 12 | # . 13 | 14 | nl=' 15 | ' 16 | IFS=" "" $nl" 17 | errstatus=0 18 | dirmode= 19 | 20 | usage="\ 21 | Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... 22 | 23 | Create each directory DIR (with mode MODE, if specified), including all 24 | leading file name components. 25 | 26 | Report bugs to ." 27 | 28 | # process command line arguments 29 | while test $# -gt 0 ; do 30 | case $1 in 31 | -h | --help | --h*) # -h for help 32 | echo "$usage" 33 | exit $? 34 | ;; 35 | -m) # -m PERM arg 36 | shift 37 | test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } 38 | dirmode=$1 39 | shift 40 | ;; 41 | --version) 42 | echo "$0 $scriptversion" 43 | exit $? 44 | ;; 45 | --) # stop option processing 46 | shift 47 | break 48 | ;; 49 | -*) # unknown option 50 | echo "$usage" 1>&2 51 | exit 1 52 | ;; 53 | *) # first non-opt arg 54 | break 55 | ;; 56 | esac 57 | done 58 | 59 | for file 60 | do 61 | if test -d "$file"; then 62 | shift 63 | else 64 | break 65 | fi 66 | done 67 | 68 | case $# in 69 | 0) exit 0 ;; 70 | esac 71 | 72 | # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and 73 | # mkdir -p a/c at the same time, both will detect that a is missing, 74 | # one will create a, then the other will try to create a and die with 75 | # a "File exists" error. This is a problem when calling mkinstalldirs 76 | # from a parallel make. We use --version in the probe to restrict 77 | # ourselves to GNU mkdir, which is thread-safe. 78 | case $dirmode in 79 | '') 80 | if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then 81 | echo "mkdir -p -- $*" 82 | exec mkdir -p -- "$@" 83 | else 84 | # On NextStep and OpenStep, the `mkdir' command does not 85 | # recognize any option. It will interpret all options as 86 | # directories to create, and then abort because `.' already 87 | # exists. 88 | test -d ./-p && rmdir ./-p 89 | test -d ./--version && rmdir ./--version 90 | fi 91 | ;; 92 | *) 93 | if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && 94 | test ! -d ./--version; then 95 | echo "mkdir -m $dirmode -p -- $*" 96 | exec mkdir -m "$dirmode" -p -- "$@" 97 | else 98 | # Clean up after NextStep and OpenStep mkdir. 99 | for d in ./-m ./-p ./--version "./$dirmode"; 100 | do 101 | test -d $d && rmdir $d 102 | done 103 | fi 104 | ;; 105 | esac 106 | 107 | for file 108 | do 109 | case $file in 110 | /*) pathcomp=/ ;; 111 | *) pathcomp= ;; 112 | esac 113 | oIFS=$IFS 114 | IFS=/ 115 | set fnord $file 116 | shift 117 | IFS=$oIFS 118 | 119 | for d 120 | do 121 | test "x$d" = x && continue 122 | 123 | pathcomp=$pathcomp$d 124 | case $pathcomp in 125 | -*) pathcomp=./$pathcomp ;; 126 | esac 127 | 128 | if test ! -d "$pathcomp"; then 129 | echo "mkdir $pathcomp" 130 | 131 | mkdir "$pathcomp" || lasterr=$? 132 | 133 | if test ! -d "$pathcomp"; then 134 | errstatus=$lasterr 135 | else 136 | if test ! -z "$dirmode"; then 137 | echo "chmod $dirmode $pathcomp" 138 | lasterr= 139 | chmod "$dirmode" "$pathcomp" || lasterr=$? 140 | 141 | if test ! -z "$lasterr"; then 142 | errstatus=$lasterr 143 | fi 144 | fi 145 | fi 146 | fi 147 | 148 | pathcomp=$pathcomp/ 149 | done 150 | done 151 | 152 | exit $errstatus 153 | 154 | # Local Variables: 155 | # mode: shell-script 156 | # sh-indentation: 2 157 | # eval: (add-hook 'write-file-hooks 'time-stamp) 158 | # time-stamp-start: "scriptversion=" 159 | # time-stamp-format: "%:y-%02m-%02d.%02H" 160 | # time-stamp-time-zone: "UTC" 161 | # time-stamp-end: "; # UTC" 162 | # End: 163 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | 2013-10-31 IgnorantGuru 2 | 3 | * added es fr pl sv 4 | 5 | 2013-02-16 delix 6 | 7 | * added de.po 8 | 9 | 2013-02-14 Matteo Bernardini 10 | 11 | * added it.po 12 | 13 | 2013-02-13 IgnorantGuru 14 | 15 | * see https://www.transifex.com/projects/p/udevil/ 16 | 17 | 2012-07-22 Vladimir Kudrya 18 | 19 | * added Russian translation ru.po 20 | 21 | 2012-07-21 IgnorantGuru 22 | 23 | * udevil.pot: Tested. To generate udevil.pot use: intltool-update --pot 24 | * POTFILES.in: Updated. 25 | 26 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # keep this file sorted alphabetically, one language code per line 2 | de 3 | es 4 | fr 5 | it 6 | pl 7 | pt_BR 8 | ru 9 | sv 10 | -------------------------------------------------------------------------------- /po/Makefile.in.in: -------------------------------------------------------------------------------- 1 | # Makefile for program source directory in GNU NLS utilities package. 2 | # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper 3 | # Copyright (C) 2004-2008 Rodney Dawes 4 | # 5 | # This file may be copied and used freely without restrictions. It may 6 | # be used in projects which are not available under a GNU Public License, 7 | # but which still want to provide support for the GNU gettext functionality. 8 | # 9 | # - Modified by Owen Taylor to use GETTEXT_PACKAGE 10 | # instead of PACKAGE and to look for po2tbl in ./ not in intl/ 11 | # 12 | # - Modified by jacob berkman to install 13 | # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize 14 | # 15 | # - Modified by Rodney Dawes for use with intltool 16 | # 17 | # We have the following line for use by intltoolize: 18 | # INTLTOOL_MAKEFILE 19 | 20 | GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ 21 | PACKAGE = @PACKAGE@ 22 | VERSION = @VERSION@ 23 | 24 | SHELL = @SHELL@ 25 | 26 | srcdir = @srcdir@ 27 | top_srcdir = @top_srcdir@ 28 | top_builddir = @top_builddir@ 29 | VPATH = @srcdir@ 30 | 31 | prefix = @prefix@ 32 | exec_prefix = @exec_prefix@ 33 | datadir = @datadir@ 34 | datarootdir = @datarootdir@ 35 | libdir = @libdir@ 36 | DATADIRNAME = @DATADIRNAME@ 37 | itlocaledir = $(prefix)/$(DATADIRNAME)/locale 38 | subdir = po 39 | install_sh = @install_sh@ 40 | # Automake >= 1.8 provides @mkdir_p@. 41 | # Until it can be supposed, use the safe fallback: 42 | mkdir_p = $(install_sh) -d 43 | 44 | INSTALL = @INSTALL@ 45 | INSTALL_DATA = @INSTALL_DATA@ 46 | 47 | GMSGFMT = @GMSGFMT@ 48 | MSGFMT = @MSGFMT@ 49 | XGETTEXT = @XGETTEXT@ 50 | INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ 51 | INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ 52 | MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist 53 | GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot 54 | 55 | ALL_LINGUAS = @ALL_LINGUAS@ 56 | 57 | PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) 58 | 59 | USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) 60 | 61 | USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) 62 | 63 | POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done) 64 | 65 | DISTFILES = Makefile.in.in POTFILES.in $(POFILES) 66 | EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS 67 | 68 | POTFILES = \ 69 | # This comment gets stripped out 70 | 71 | CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done) 72 | 73 | .SUFFIXES: 74 | .SUFFIXES: .po .pox .gmo .mo .msg .cat 75 | 76 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ 77 | INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V)) 78 | INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY)) 79 | INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@; 80 | 81 | .po.pox: 82 | $(MAKE) $(GETTEXT_PACKAGE).pot 83 | $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox 84 | 85 | .po.mo: 86 | $(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $< 87 | 88 | .po.gmo: 89 | $(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \ 90 | && rm -f $$file && $(GMSGFMT) -o $$file $< 91 | 92 | .po.cat: 93 | sed -f ../intl/po2msg.sed < $< > $*.msg \ 94 | && rm -f $@ && gencat $@ $*.msg 95 | 96 | 97 | all: all-@USE_NLS@ 98 | 99 | all-yes: $(CATALOGS) 100 | all-no: 101 | 102 | $(GETTEXT_PACKAGE).pot: $(POTFILES) 103 | $(GENPOT) 104 | 105 | install: install-data 106 | install-data: install-data-@USE_NLS@ 107 | install-data-no: all 108 | install-data-yes: all 109 | linguas="$(USE_LINGUAS)"; \ 110 | for lang in $$linguas; do \ 111 | dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \ 112 | $(mkdir_p) $$dir; \ 113 | if test -r $$lang.gmo; then \ 114 | $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ 115 | echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \ 116 | else \ 117 | $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \ 118 | echo "installing $(srcdir)/$$lang.gmo as" \ 119 | "$$dir/$(GETTEXT_PACKAGE).mo"; \ 120 | fi; \ 121 | if test -r $$lang.gmo.m; then \ 122 | $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \ 123 | echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \ 124 | else \ 125 | if test -r $(srcdir)/$$lang.gmo.m ; then \ 126 | $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \ 127 | $$dir/$(GETTEXT_PACKAGE).mo.m; \ 128 | echo "installing $(srcdir)/$$lang.gmo.m as" \ 129 | "$$dir/$(GETTEXT_PACKAGE).mo.m"; \ 130 | else \ 131 | true; \ 132 | fi; \ 133 | fi; \ 134 | done 135 | 136 | # Empty stubs to satisfy archaic automake needs 137 | dvi info ctags tags CTAGS TAGS ID: 138 | 139 | # Define this as empty until I found a useful application. 140 | install-exec installcheck: 141 | 142 | uninstall: 143 | linguas="$(USE_LINGUAS)"; \ 144 | for lang in $$linguas; do \ 145 | rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \ 146 | rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \ 147 | done 148 | 149 | check: all $(GETTEXT_PACKAGE).pot 150 | rm -f missing notexist 151 | srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m 152 | if [ -r missing -o -r notexist ]; then \ 153 | exit 1; \ 154 | fi 155 | 156 | mostlyclean: 157 | rm -f *.pox *.old.po cat-id-tbl.tmp 158 | rm -f .intltool-merge-cache 159 | 160 | clean: mostlyclean 161 | 162 | distclean: clean 163 | rm -f Makefile Makefile.in POTFILES stamp-it 164 | rm -f *.mo *.msg *.cat *.cat.m *.gmo 165 | 166 | maintainer-clean: distclean 167 | @echo "This command is intended for maintainers to use;" 168 | @echo "it deletes files that may require special tools to rebuild." 169 | rm -f Makefile.in.in 170 | 171 | distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) 172 | dist distdir: $(DISTFILES) 173 | dists="$(DISTFILES)"; \ 174 | extra_dists="$(EXTRA_DISTFILES)"; \ 175 | for file in $$extra_dists; do \ 176 | test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \ 177 | done; \ 178 | for file in $$dists; do \ 179 | test -f $$file || file="$(srcdir)/$$file"; \ 180 | ln $$file $(distdir) 2> /dev/null \ 181 | || cp -p $$file $(distdir); \ 182 | done 183 | 184 | update-po: Makefile 185 | $(MAKE) $(GETTEXT_PACKAGE).pot 186 | tmpdir=`pwd`; \ 187 | linguas="$(USE_LINGUAS)"; \ 188 | for lang in $$linguas; do \ 189 | echo "$$lang:"; \ 190 | result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \ 191 | if $$result; then \ 192 | if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 193 | rm -f $$tmpdir/$$lang.new.po; \ 194 | else \ 195 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 196 | :; \ 197 | else \ 198 | echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 199 | rm -f $$tmpdir/$$lang.new.po; \ 200 | exit 1; \ 201 | fi; \ 202 | fi; \ 203 | else \ 204 | echo "msgmerge for $$lang.gmo failed!"; \ 205 | rm -f $$tmpdir/$$lang.new.po; \ 206 | fi; \ 207 | done 208 | 209 | Makefile POTFILES: stamp-it 210 | @if test ! -f $@; then \ 211 | rm -f stamp-it; \ 212 | $(MAKE) stamp-it; \ 213 | fi 214 | 215 | stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in 216 | cd $(top_builddir) \ 217 | && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \ 218 | $(SHELL) ./config.status 219 | 220 | # Tell versions [3.59,3.63) of GNU make not to export all variables. 221 | # Otherwise a system limit (for SysV at least) may be exceeded. 222 | .NOEXPORT: 223 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file in alphabetical order. 3 | [encoding: UTF-8] 4 | src/udevil.c 5 | src/canonicalize.c 6 | -------------------------------------------------------------------------------- /po/udevil.pot: -------------------------------------------------------------------------------- 1 | # udevil PO Template http://ignorantguru.github.com/udevil/ 2 | # This file is distributed under the same copyright and license as the udevil 3 | # package. 4 | # FIRST AUTHOR , YEAR. 5 | # 6 | #, fuzzy 7 | msgid "" 8 | msgstr "" 9 | "Project-Id-Version: udevil 0.4.3+\n" 10 | "Report-Msgid-Bugs-To: \n" 11 | "POT-Creation-Date: 2015-04-28 18:39+0000\n" 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "Language: \n" 16 | "MIME-Version: 1.0\n" 17 | "Content-Type: text/plain; charset=CHARSET\n" 18 | "Content-Transfer-Encoding: 8bit\n" 19 | 20 | #: ../src/udevil.c:616 21 | #, c-format 22 | msgid "" 23 | "udevil: error 1: unable to drop priviledges - please report this problem\n" 24 | msgstr "" 25 | 26 | #: ../src/udevil.c:810 27 | #, c-format 28 | msgid "udevil: error 2: %s line %d is not valid UTF-8\n" 29 | msgstr "" 30 | 31 | #: ../src/udevil.c:815 32 | #, c-format 33 | msgid "udevil: error 3: %s line %d is too long\n" 34 | msgstr "" 35 | 36 | #: ../src/udevil.c:824 37 | #, c-format 38 | msgid "udevil: error 4: %s line %d syntax error:\n" 39 | msgstr "" 40 | 41 | #: ../src/udevil.c:836 42 | #, c-format 43 | msgid "udevil: error 5: %s line %d syntax error:\n" 44 | msgstr "" 45 | 46 | #: ../src/udevil.c:842 47 | #, c-format 48 | msgid "udevil: error 6: %s line %d duplicate assignment:\n" 49 | msgstr "" 50 | 51 | #: ../src/udevil.c:904 52 | #, c-format 53 | msgid "udevil: warning 7: cannot read config file %s\n" 54 | msgstr "" 55 | 56 | #: ../src/udevil.c:916 57 | #, c-format 58 | msgid "udevil: read config %s\n" 59 | msgstr "" 60 | 61 | #: ../src/udevil.c:1162 62 | #, c-format 63 | msgid "udevil: error 8: failed writing to log file '%s'\n" 64 | msgstr "" 65 | 66 | #: ../src/udevil.c:1233 67 | #, c-format 68 | msgid "udevil: warning 124: invalid use of /** suffix in pattern '%s'\n" 69 | msgstr "" 70 | 71 | #: ../src/udevil.c:1236 72 | #, c-format 73 | msgid "udevil: warning 125: ** wildcard not allowed in %s\n" 74 | msgstr "" 75 | 76 | #: ../src/udevil.c:1534 ../src/udevil.c:1576 ../src/udevil.c:1638 77 | #: ../src/udevil.c:1681 78 | #, c-format 79 | msgid "udevil: warning 9: unable to run losetup (%s)\n" 80 | msgstr "" 81 | 82 | #: ../src/udevil.c:1589 83 | msgid "udevil: error 147: unable to get free loop device\n" 84 | msgstr "" 85 | 86 | #: ../src/udevil.c:1598 87 | msgid "udevil: error 150: path changed\n" 88 | msgstr "" 89 | 90 | #: ../src/udevil.c:1738 91 | #, c-format 92 | msgid "udevil: warning 10: unable to run losetup (%s)\n" 93 | msgstr "" 94 | 95 | #: ../src/udevil.c:1972 96 | #, c-format 97 | msgid "udevil: error 11: could not open %s\n" 98 | msgstr "" 99 | 100 | #: ../src/udevil.c:1980 101 | #, c-format 102 | msgid "udevil: error 12: error writing to %s\n" 103 | msgstr "" 104 | 105 | #: ../src/udevil.c:2030 106 | #, c-format 107 | msgid "udevil: error 13: unable to run %s\n" 108 | msgstr "" 109 | 110 | #: ../src/udevil.c:2042 111 | #, c-format 112 | msgid " %s exit status = %d\n" 113 | msgstr "" 114 | 115 | #: ../src/udevil.c:2047 116 | #, c-format 117 | msgid "udevil: denied 14: %s returned exit status %d\n" 118 | msgstr "" 119 | 120 | #. log 121 | #: ../src/udevil.c:2085 122 | msgid "udevil: trying umount as current user\n" 123 | msgstr "" 124 | 125 | #: ../src/udevil.c:2098 126 | #, c-format 127 | msgid "udevil: warning 15: unable to run umount (%s)\n" 128 | msgstr "" 129 | 130 | #: ../src/udevil.c:2103 ../src/udevil.c:2176 131 | #, c-format 132 | msgid " umount exit status = %d\n" 133 | msgstr "" 134 | 135 | #. success - show output 136 | #: ../src/udevil.c:2112 137 | msgid "udevil: success running umount as current user\n" 138 | msgstr "" 139 | 140 | #: ../src/udevil.c:2155 ../src/udevil.c:2227 141 | msgid "udevil: error 144: invalid path\n" 142 | msgstr "" 143 | 144 | #: ../src/udevil.c:2166 145 | #, c-format 146 | msgid "udevil: error 16: unable to run umount (%s)\n" 147 | msgstr "" 148 | 149 | #: ../src/udevil.c:2239 150 | #, c-format 151 | msgid "udevil: error 17: unable to run mount (%s)\n" 152 | msgstr "" 153 | 154 | #: ../src/udevil.c:2252 155 | #, c-format 156 | msgid " mount exit status = %d\n" 157 | msgstr "" 158 | 159 | #: ../src/udevil.c:2266 160 | msgid "udevil: error 148: unable to attach file to loop device\n" 161 | msgstr "" 162 | 163 | #: ../src/udevil.c:2310 164 | #, c-format 165 | msgid "udevil: warning 18: unable to run mount (%s)\n" 166 | msgstr "" 167 | 168 | #: ../src/udevil.c:2327 169 | #, c-format 170 | msgid "udevil: denied 19: Invalid path\n" 171 | msgstr "" 172 | 173 | #: ../src/udevil.c:2333 174 | #, c-format 175 | msgid "udevil: denied 20: mount path '%s' is not a directory\n" 176 | msgstr "" 177 | 178 | #: ../src/udevil.c:2335 179 | #, c-format 180 | msgid "udevil: denied 21: mount path '%s' is already mounted\n" 181 | msgstr "" 182 | 183 | #: ../src/udevil.c:2339 184 | #, c-format 185 | msgid "udevil: denied 22: cannot stat '%s': %s\n" 186 | msgstr "" 187 | 188 | #: ../src/udevil.c:2341 189 | #, c-format 190 | msgid "udevil: denied 23: neither you nor root owns '%s'\n" 191 | msgstr "" 192 | 193 | #: ../src/udevil.c:2376 194 | #, c-format 195 | msgid "udevil: warning 24: unable to run setfacl (%s)\n" 196 | msgstr "" 197 | 198 | #. setfacl apparently failed so fallback to udisks2 fallback permissions 199 | #: ../src/udevil.c:2384 200 | #, c-format 201 | msgid "" 202 | "udevil: warning 25: setfacl on %s failed, falling back to 'user:root " 203 | "rwx------'\n" 204 | msgstr "" 205 | 206 | #: ../src/udevil.c:2491 207 | #, c-format 208 | msgid "" 209 | "udevil: error 26: invalid type '%s' for SMB share - must be cifs or smbfs\n" 210 | msgstr "" 211 | 212 | #: ../src/udevil.c:2506 213 | #, c-format 214 | msgid "" 215 | "udevil: error 27: invalid type '%s' for NFS share - must be nfs or nfs4\n" 216 | msgstr "" 217 | 218 | #: ../src/udevil.c:2519 219 | #, c-format 220 | msgid "" 221 | "udevil: error 28: invalid type '%s' for curlftpfs share - must be curlftpfs\n" 222 | msgstr "" 223 | 224 | #: ../src/udevil.c:2531 225 | #, c-format 226 | msgid "" 227 | "udevil: error 29: invalid type '%s' for FTP share - must be curlftpfs or " 228 | "ftpfs\n" 229 | msgstr "" 230 | 231 | #: ../src/udevil.c:2556 232 | #, c-format 233 | msgid "udevil: error 30: invalid type '%s' for sshfs share - must be sshfs\n" 234 | msgstr "" 235 | 236 | #: ../src/udevil.c:2569 237 | #, c-format 238 | msgid "udevil: error 31: invalid type '%s' for sshfs share - must be sshfs\n" 239 | msgstr "" 240 | 241 | #: ../src/udevil.c:2581 242 | #, c-format 243 | msgid "udevil: error 151: invalid type '%s' for WebDAV share - must be davfs\n" 244 | msgstr "" 245 | 246 | #: ../src/udevil.c:2596 247 | #, c-format 248 | msgid "udevil: error 32: invalid type '%s' for sshfs share - must be sshfs\n" 249 | msgstr "" 250 | 251 | #: ../src/udevil.c:2607 252 | #, c-format 253 | msgid "" 254 | "udevil: error 33: invalid type '%s' for NFS share - must be nfs or nfs4\n" 255 | msgstr "" 256 | 257 | #: ../src/udevil.c:2724 258 | #, c-format 259 | msgid "udevil: error 34: '%s' is not a recognized network url\n" 260 | msgstr "" 261 | 262 | #: ../src/udevil.c:2733 263 | msgid "udevil: error 35: invalid network url\n" 264 | msgstr "" 265 | 266 | #: ../src/udevil.c:2750 267 | #, c-format 268 | msgid "udevil: error 36: lookup host '%s' failed\n" 269 | msgstr "" 270 | 271 | #: ../src/udevil.c:2800 272 | #, c-format 273 | msgid "udevil: error 37: %s\n" 274 | msgstr "" 275 | 276 | #: ../src/udevil.c:2801 ../src/udevil.c:4338 ../src/udevil.c:4661 277 | msgid "udevil was not run suid root" 278 | msgstr "" 279 | 280 | #: ../src/udevil.c:2806 ../src/udevil.c:4343 ../src/udevil.c:4666 281 | msgid "To correct this problem" 282 | msgstr "" 283 | 284 | #: ../src/udevil.c:2820 285 | msgid "udevil: error 38: mount requires DEVICE argument\n" 286 | msgstr "" 287 | 288 | #: ../src/udevil.c:2822 289 | msgid "udevil: error 39: unmount requires DEVICE argument\n" 290 | msgstr "" 291 | 292 | #: ../src/udevil.c:2867 293 | #, c-format 294 | msgid "udevil: error 40: cannot stat %s: %s\n" 295 | msgstr "" 296 | 297 | #: ../src/udevil.c:2879 298 | msgid "udevil: error 41: cannot canonicalize device path\n" 299 | msgstr "" 300 | 301 | #: ../src/udevil.c:2886 302 | #, c-format 303 | msgid "udevil: error 42: cannot stat %s: %s\n" 304 | msgstr "" 305 | 306 | #: ../src/udevil.c:2897 307 | #, c-format 308 | msgid "udevil: error 43: '%s' is not a regular file or directory\n" 309 | msgstr "" 310 | 311 | #. mount knows (in fstab) so mount as normal user with only specified opts 312 | #: ../src/udevil.c:2936 ../src/udevil.c:3917 313 | #, c-format 314 | msgid "udevil: %s is known to mount - running mount as current user\n" 315 | msgstr "" 316 | 317 | #: ../src/udevil.c:2939 318 | msgid "" 319 | "udevil: warning 44: fstype ignored for device in fstab (or specify mount " 320 | "point)\n" 321 | msgstr "" 322 | 323 | #: ../src/udevil.c:2942 324 | msgid "" 325 | "udevil: warning 45: options ignored for device in fstab (or specify mount " 326 | "point)\n" 327 | msgstr "" 328 | 329 | #: ../src/udevil.c:3033 330 | #, c-format 331 | msgid "udevil: error 46: cannot find '%s' mounted in mtab\n" 332 | msgstr "" 333 | 334 | #: ../src/udevil.c:3047 335 | msgid "udevil: error 47: cannot canonicalize attached loop device\n" 336 | msgstr "" 337 | 338 | #: ../src/udevil.c:3053 339 | msgid "udevil: denied 48: 'file' is not an allowed type\n" 340 | msgstr "" 341 | 342 | #: ../src/udevil.c:3061 343 | #, c-format 344 | msgid "udevil: denied 49: '%s' is not an allowed file\n" 345 | msgstr "" 346 | 347 | #: ../src/udevil.c:3068 348 | #, c-format 349 | msgid "udevil: error 50: cannot find '%s' mounted in mtab\n" 350 | msgstr "" 351 | 352 | #: ../src/udevil.c:3087 353 | #, c-format 354 | msgid "udevil: warning 51: attached device %s is not a loop device\n" 355 | msgstr "" 356 | 357 | #: ../src/udevil.c:3112 358 | #, c-format 359 | msgid "udevil: error 52: cannot stat %s: %s\n" 360 | msgstr "" 361 | 362 | #: ../src/udevil.c:3131 363 | msgid "udevil: error 53: cannot canonicalize path\n" 364 | msgstr "" 365 | 366 | #: ../src/udevil.c:3147 367 | #, c-format 368 | msgid "udevil: error 54: invalid path '%s'\n" 369 | msgstr "" 370 | 371 | #: ../src/udevil.c:3156 372 | #, c-format 373 | msgid "udevil: error 55: cannot find '%s' mounted in mtab\n" 374 | msgstr "" 375 | 376 | #: ../src/udevil.c:3163 377 | #, c-format 378 | msgid "udevil: error 56: cannot find device %s fstype in mtab\n" 379 | msgstr "" 380 | 381 | #: ../src/udevil.c:3174 382 | #, c-format 383 | msgid "udevil: error 57: cannot stat %s: %s\n" 384 | msgstr "" 385 | 386 | #: ../src/udevil.c:3183 387 | #, c-format 388 | msgid "udevil: error 58: %s is not a block device\n" 389 | msgstr "" 390 | 391 | #: ../src/udevil.c:3192 392 | msgid "udevil: error 59: error initializing libudev\n" 393 | msgstr "" 394 | 395 | #: ../src/udevil.c:3200 396 | #, c-format 397 | msgid "udevil: error 60: no udev device for device %s\n" 398 | msgstr "" 399 | 400 | #: ../src/udevil.c:3211 401 | #, c-format 402 | msgid "udevil: error 61: unable to get device info for device %s\n" 403 | msgstr "" 404 | 405 | #: ../src/udevil.c:3234 406 | #, c-format 407 | msgid "udevil: error 62: type %s is invalid for block device\n" 408 | msgstr "" 409 | 410 | #: ../src/udevil.c:3254 411 | msgid "udevil: error 143: unable to determine device fstype\n" 412 | msgstr "" 413 | 414 | #: ../src/udevil.c:3257 415 | #, c-format 416 | msgid "udevil: error 63: no media in device %s (or specify type with -t)\n" 417 | msgstr "" 418 | 419 | #: ../src/udevil.c:3260 420 | msgid "udevil: error 64: unable to determine device fstype - specify with -t\n" 421 | msgstr "" 422 | 423 | #: ../src/udevil.c:3320 424 | #, c-format 425 | msgid "udevil: denied 65: device %s is not mounted\n" 426 | msgstr "" 427 | 428 | #: ../src/udevil.c:3323 429 | #, c-format 430 | msgid "udevil: denied 66: could not find mount point for '%s'\n" 431 | msgstr "" 432 | 433 | #: ../src/udevil.c:3343 434 | msgid "udevil: error 67: cannot canonicalize mount point path\n" 435 | msgstr "" 436 | 437 | #: ../src/udevil.c:3354 438 | #, c-format 439 | msgid "udevil: error 68: cannot stat '%s'\n" 440 | msgstr "" 441 | 442 | #: ../src/udevil.c:3372 443 | msgid "udevil: error 69: cannot canonicalize mount point path\n" 444 | msgstr "" 445 | 446 | #: ../src/udevil.c:3383 447 | msgid "udevil: error 70: cannot canonicalize mount point path\n" 448 | msgstr "" 449 | 450 | #: ../src/udevil.c:3393 451 | #, c-format 452 | msgid "udevil: denied 71: '%s' is not an allowed media directory\n" 453 | msgstr "" 454 | 455 | #: ../src/udevil.c:3405 456 | msgid "udevil: error 72: multiple fstypes not allowed\n" 457 | msgstr "" 458 | 459 | #: ../src/udevil.c:3411 460 | #, c-format 461 | msgid "udevil: denied 73: fstype '%s' is not an allowed type\n" 462 | msgstr "" 463 | 464 | #: ../src/udevil.c:3420 465 | msgid "udevil: error 74: could not get username\n" 466 | msgstr "" 467 | 468 | #: ../src/udevil.c:3428 469 | #, c-format 470 | msgid "udevil: denied 75: user '%s' (%s) is not in allowed users\n" 471 | msgstr "" 472 | 473 | #: ../src/udevil.c:3450 474 | #, c-format 475 | msgid "udevil: denied 77: user %s is not in allowed groups\n" 476 | msgstr "" 477 | 478 | #: ../src/udevil.c:3462 479 | #, c-format 480 | msgid "udevil: denied 78: host '%s' (%s) is not an allowed network\n" 481 | msgstr "" 482 | 483 | #: ../src/udevil.c:3468 484 | #, c-format 485 | msgid "udevil: denied 79: host '%s' (%s) is a forbidden network\n" 486 | msgstr "" 487 | 488 | #: ../src/udevil.c:3483 489 | #, c-format 490 | msgid "udevil: denied 80: device %s is not an allowed device\n" 491 | msgstr "" 492 | 493 | #: ../src/udevil.c:3490 494 | #, c-format 495 | msgid "udevil: denied 81: device %s is a forbidden device\n" 496 | msgstr "" 497 | 498 | #: ../src/udevil.c:3506 499 | #, c-format 500 | msgid "udevil: denied 82: '%s' is not an allowed file\n" 501 | msgstr "" 502 | 503 | #: ../src/udevil.c:3513 504 | #, c-format 505 | msgid "udevil: denied 83: you don't have read permission for file '%s'\n" 506 | msgstr "" 507 | 508 | #: ../src/udevil.c:3524 509 | #, c-format 510 | msgid "udevil: denied 145: cannot open '%s'\n" 511 | msgstr "" 512 | 513 | #: ../src/udevil.c:3537 514 | msgid "udevil: error 146: path changed\n" 515 | msgstr "" 516 | 517 | #: ../src/udevil.c:3545 518 | msgid "udevil: error 84: cannot specify mount point for directory\n" 519 | msgstr "" 520 | 521 | #: ../src/udevil.c:3565 522 | #, c-format 523 | msgid "udevil: denied 85: %s is attached to an invalid file\n" 524 | msgstr "" 525 | 526 | #: ../src/udevil.c:3573 527 | #, c-format 528 | msgid "udevil: denied 86: '%s' is not a permitted file\n" 529 | msgstr "" 530 | 531 | #: ../src/udevil.c:3583 532 | #, c-format 533 | msgid "udevil: denied 87: '%s' is not an allowed file\n" 534 | msgstr "" 535 | 536 | #: ../src/udevil.c:3604 537 | #, c-format 538 | msgid "" 539 | "udevil: denied 88: device %s is an internal device and you're not root\n" 540 | msgstr "" 541 | 542 | #: ../src/udevil.c:3806 543 | #, c-format 544 | msgid "udevil: error 89: options contain an invalid character ('%c')\n" 545 | msgstr "" 546 | 547 | #: ../src/udevil.c:3815 548 | #, c-format 549 | msgid "udevil: denied 90: option '%s' is not an allowed option\n" 550 | msgstr "" 551 | 552 | #: ../src/udevil.c:3826 553 | msgid "udevil: denied 91: cannot use remount option with FTP or sshfs share\n" 554 | msgstr "" 555 | 556 | #: ../src/udevil.c:3835 557 | msgid "udevil: denied 149: cannot use remount option with file\n" 558 | msgstr "" 559 | 560 | #: ../src/udevil.c:3885 561 | #, c-format 562 | msgid "" 563 | "udevil: denied 92: device %s is already mounted (or specify mount point)\n" 564 | msgstr "" 565 | 566 | #: ../src/udevil.c:3896 567 | #, c-format 568 | msgid "" 569 | "udevil: denied 93: file %s is already mounted at %s (or specify mount " 570 | "point)\n" 571 | msgstr "" 572 | 573 | #: ../src/udevil.c:3900 574 | #, c-format 575 | msgid "udevil: denied 94: file %s is already attached to loop device\n" 576 | msgstr "" 577 | 578 | #: ../src/udevil.c:3908 579 | #, c-format 580 | msgid "udevil: denied 95: %s is already mounted (or specify mount point)\n" 581 | msgstr "" 582 | 583 | #: ../src/udevil.c:3920 584 | msgid "" 585 | "udevil: warning 96: fstype ignored for device in fstab (or specify mount " 586 | "point)\n" 587 | msgstr "" 588 | 589 | #: ../src/udevil.c:3923 590 | msgid "" 591 | "udevil: warning 97: options ignored for device in fstab (or specify mount " 592 | "point)\n" 593 | msgstr "" 594 | 595 | #: ../src/udevil.c:3965 596 | #, c-format 597 | msgid "udevil: denied 98: '%s' is already mounted (or specify mount point)\n" 598 | msgstr "" 599 | 600 | #: ../src/udevil.c:3968 601 | #, c-format 602 | msgid "udevil: denied 99: can't mount '%s' (not in fstab?)\n" 603 | msgstr "" 604 | 605 | #: ../src/udevil.c:3982 606 | msgid "udevil: denied 100: must specify device or network for remount\n" 607 | msgstr "" 608 | 609 | #: ../src/udevil.c:3988 610 | msgid "udevil: warning 101: specified mount point with remount ignored\n" 611 | msgstr "" 612 | 613 | #: ../src/udevil.c:4033 614 | #, c-format 615 | msgid "udevil: warning 102: device %s is already mounted on %s\n" 616 | msgstr "" 617 | 618 | #: ../src/udevil.c:4045 619 | msgid "udevil: error 103: no valid existing directory in allowed_media_dirs\n" 620 | msgstr "" 621 | 622 | #: ../src/udevil.c:4159 623 | #, c-format 624 | msgid "udevil: error 104: mount point '%s' is not a valid UTF8 string\n" 625 | msgstr "" 626 | 627 | #: ../src/udevil.c:4181 628 | #, c-format 629 | msgid "udevil: error 105: mkdir '%s' failed\n" 630 | msgstr "" 631 | 632 | #. try cifs as guest first 633 | #: ../src/udevil.c:4214 634 | #, c-format 635 | msgid "udevil: trying %s as guest\n" 636 | msgstr "" 637 | 638 | #: ../src/udevil.c:4225 639 | #, c-format 640 | msgid "udevil: trying with %s\n" 641 | msgstr "" 642 | 643 | #: ../src/udevil.c:4272 644 | msgid "" 645 | "udevil: warning 106: invalid mount_point_mode in udevil.conf - using 0755\n" 646 | msgstr "" 647 | 648 | #: ../src/udevil.c:4337 649 | #, c-format 650 | msgid "udevil: error 107: %s\n" 651 | msgstr "" 652 | 653 | #: ../src/udevil.c:4352 654 | msgid "udevil: error 108: remove requires DEVICE argument\n" 655 | msgstr "" 656 | 657 | #: ../src/udevil.c:4358 658 | #, c-format 659 | msgid "udevil: error 109: cannot stat %s: %s\n" 660 | msgstr "" 661 | 662 | #: ../src/udevil.c:4366 663 | #, c-format 664 | msgid "udevil: error 110: %s is not a block device\n" 665 | msgstr "" 666 | 667 | #: ../src/udevil.c:4373 668 | msgid "udevil: error 111: error initializing libudev\n" 669 | msgstr "" 670 | 671 | #: ../src/udevil.c:4380 672 | #, c-format 673 | msgid "udevil: error 112: no udev device for device %s\n" 674 | msgstr "" 675 | 676 | #: ../src/udevil.c:4389 677 | msgid "udevil: error 113: unable to get device info\n" 678 | msgstr "" 679 | 680 | #: ../src/udevil.c:4401 681 | #, c-format 682 | msgid "" 683 | "udevil: warning 114: device %s is an internal device - not unbinding driver\n" 684 | msgstr "" 685 | 686 | #: ../src/udevil.c:4412 687 | msgid "" 688 | "udevil: warning 115: interface is not usb, firewire, sdio, esata - not " 689 | "unbinding driver\n" 690 | msgstr "" 691 | 692 | #: ../src/udevil.c:4420 693 | #, c-format 694 | msgid "udevil: denied 116: device %s is not an allowed device\n" 695 | msgstr "" 696 | 697 | #: ../src/udevil.c:4426 698 | #, c-format 699 | msgid "udevil: denied 117: device %s is a forbidden device\n" 700 | msgstr "" 701 | 702 | #: ../src/udevil.c:4464 703 | #, c-format 704 | msgid "udevil: unmount %s\n" 705 | msgstr "" 706 | 707 | #: ../src/udevil.c:4498 708 | #, c-format 709 | msgid "udevil: error 118: unable to access dir %s\n" 710 | msgstr "" 711 | 712 | #: ../src/udevil.c:4523 713 | #, c-format 714 | msgid "udevil: examining partition %s\n" 715 | msgstr "" 716 | 717 | #. unmount partition 718 | #: ../src/udevil.c:4528 719 | #, c-format 720 | msgid "udevil: unmount partition %s\n" 721 | msgstr "" 722 | 723 | #: ../src/udevil.c:4580 724 | #, c-format 725 | msgid "udevil: error 119: unable to find host for %s\n" 726 | msgstr "" 727 | 728 | #: ../src/udevil.c:4586 729 | #, c-format 730 | msgid "udevil: error 120: unable to find host for %s\n" 731 | msgstr "" 732 | 733 | #: ../src/udevil.c:4595 734 | #, c-format 735 | msgid "udevil: error 121: unable to find last component for %s\n" 736 | msgstr "" 737 | 738 | #: ../src/udevil.c:4619 739 | #, c-format 740 | msgid "udevil: warning 122: missing power autosuspend %s\n" 741 | msgstr "" 742 | 743 | #: ../src/udevil.c:4631 744 | #, c-format 745 | msgid "udevil: warning 123: missing power control %s\n" 746 | msgstr "" 747 | 748 | #: ../src/udevil.c:4660 749 | #, c-format 750 | msgid "udevil: error 124: %s\n" 751 | msgstr "" 752 | 753 | #: ../src/udevil.c:4741 754 | msgid "udevil: error 126: info requires DEVICE argument\n" 755 | msgstr "" 756 | 757 | #: ../src/udevil.c:4747 758 | #, c-format 759 | msgid "udevil: error 127: cannot stat %s: %s\n" 760 | msgstr "" 761 | 762 | #: ../src/udevil.c:4755 763 | #, c-format 764 | msgid "udevil: error 128: %s is not a block device\n" 765 | msgstr "" 766 | 767 | #: ../src/udevil.c:4762 768 | msgid "udevil: error 129: error initializing libudev\n" 769 | msgstr "" 770 | 771 | #: ../src/udevil.c:4769 772 | #, c-format 773 | msgid "udevil: error 130: no udev device for device %s\n" 774 | msgstr "" 775 | 776 | #: ../src/udevil.c:4785 777 | msgid "udevil: error 131: unable to get device info\n" 778 | msgstr "" 779 | 780 | #: ../src/udevil.c:4837 781 | msgid "udevil: error 132: unable to initialize udev\n" 782 | msgstr "" 783 | 784 | #: ../src/udevil.c:4848 785 | msgid "udevil: error 133: cannot create udev monitor\n" 786 | msgstr "" 787 | 788 | #: ../src/udevil.c:4853 789 | msgid "udevil: error 134: cannot enable udev monitor receiving\n" 790 | msgstr "" 791 | 792 | #: ../src/udevil.c:4858 793 | msgid "udevil: error 135: cannot set udev filter\n" 794 | msgstr "" 795 | 796 | #: ../src/udevil.c:4865 797 | msgid "udevil: error 136: cannot get udev monitor socket file descriptor\n" 798 | msgstr "" 799 | 800 | #: ../src/udevil.c:4886 801 | #, c-format 802 | msgid "udevil: error 137: monitoring /proc/self/mountinfo: %s\n" 803 | msgstr "" 804 | 805 | #: ../src/udevil.c:4937 806 | #, c-format 807 | msgid "" 808 | "Mounts and unmounts devices without password, shows device info, monitors\n" 809 | msgstr "" 810 | 811 | #: ../src/udevil.c:4938 812 | #, c-format 813 | msgid "" 814 | "device changes. Emulates udisks1/2 command line usage and udisks1 output.\n" 815 | msgstr "" 816 | 817 | #: ../src/udevil.c:4939 818 | #, c-format 819 | msgid "Usage: udevil [OPTIONS] COMMAND [COMMAND-OPTIONS] [COMMAND-ARGUMENTS]\n" 820 | msgstr "" 821 | 822 | #: ../src/udevil.c:4940 823 | #, c-format 824 | msgid "OPTIONS:\n" 825 | msgstr "" 826 | 827 | #: ../src/udevil.c:4941 828 | msgid "print details" 829 | msgstr "" 830 | 831 | #: ../src/udevil.c:4942 832 | msgid "minimal output" 833 | msgstr "" 834 | 835 | #: ../src/udevil.c:4943 836 | #, c-format 837 | msgid "MOUNT - Mounts DEVICE to mount point DIR with MOUNT-OPTIONS:\n" 838 | msgstr "" 839 | 840 | #: ../src/udevil.c:4944 841 | #, c-format 842 | msgid "" 843 | " udevil mount|--mount [MOUNT-OPTIONS] [[-b|--block-device] DEVICE] [DIR]\n" 844 | msgstr "" 845 | 846 | #: ../src/udevil.c:4945 847 | #, c-format 848 | msgid " MOUNT-OPTIONS:\n" 849 | msgstr "" 850 | 851 | #: ../src/udevil.c:4946 ../src/udevil.c:4947 852 | msgid "see man mount" 853 | msgstr "" 854 | 855 | #. printf( " -L LABEL mount device by label LABEL\n" ); 856 | #. printf( " -U UUID mount device by UUID\n" ); 857 | #: ../src/udevil.c:4950 ../src/udevil.c:4985 ../src/udevil.c:4997 858 | msgid "ignored (for compatibility)" 859 | msgstr "" 860 | 861 | #: ../src/udevil.c:4951 ../src/udevil.c:4986 862 | msgid "EXAMPLES" 863 | msgstr "" 864 | 865 | #. printf( " udevil mount -L 'Disk Label'\n" ); 866 | #: ../src/udevil.c:4956 867 | msgid "ISO file" 868 | msgstr "" 869 | 870 | #: ../src/udevil.c:4957 871 | msgid "ftp site - requires" 872 | msgstr "" 873 | 874 | #: ../src/udevil.c:4958 875 | msgid "or" 876 | msgstr "" 877 | 878 | #: ../src/udevil.c:4959 ../src/udevil.c:4961 879 | msgid "ftp share with" 880 | msgstr "" 881 | 882 | #: ../src/udevil.c:4960 883 | msgid "user and password" 884 | msgstr "" 885 | 886 | #: ../src/udevil.c:4962 887 | msgid "port, user and password" 888 | msgstr "" 889 | 890 | #: ../src/udevil.c:4963 891 | msgid "ftp site with ftpfs" 892 | msgstr "" 893 | 894 | #: ../src/udevil.c:4964 895 | msgid "ftp site with curl" 896 | msgstr "" 897 | 898 | #: ../src/udevil.c:4965 899 | msgid "ftp site with curl u/p" 900 | msgstr "" 901 | 902 | #: ../src/udevil.c:4966 ../src/udevil.c:4967 903 | msgid "nfs share" 904 | msgstr "" 905 | 906 | #: ../src/udevil.c:4968 ../src/udevil.c:4971 907 | msgid "samba share w/ cifs" 908 | msgstr "" 909 | 910 | #: ../src/udevil.c:4969 911 | msgid "samba share w/ u/p/port" 912 | msgstr "" 913 | 914 | #: ../src/udevil.c:4970 915 | msgid "samba share w/ workgroup" 916 | msgstr "" 917 | 918 | #: ../src/udevil.c:4972 919 | msgid "samba share w/ smbfs" 920 | msgstr "" 921 | 922 | #: ../src/udevil.c:4973 923 | msgid "sshfs with user - " 924 | msgstr "" 925 | 926 | #: ../src/udevil.c:4974 927 | msgid "requires sshfs" 928 | msgstr "" 929 | 930 | #: ../src/udevil.c:4975 931 | msgid "sshfs with user" 932 | msgstr "" 933 | 934 | #: ../src/udevil.c:4976 935 | msgid "WebDAV - requires davfs2" 936 | msgstr "" 937 | 938 | #: ../src/udevil.c:4977 939 | msgid "make a ram drive" 940 | msgstr "" 941 | 942 | #: ../src/udevil.c:4978 943 | #, c-format 944 | msgid "" 945 | "\n" 946 | " WARNING !!! a password on the command line is UNSAFE - see filesystem " 947 | "docs\n" 948 | "\n" 949 | msgstr "" 950 | 951 | #: ../src/udevil.c:4979 952 | #, c-format 953 | msgid "UNMOUNT - Unmount DEVICE or DIR with UNMOUNT-OPTIONS:\n" 954 | msgstr "" 955 | 956 | #: ../src/udevil.c:4980 957 | #, c-format 958 | msgid " udevil umount|unmount|--unmount|--umount [UNMOUNT-OPTIONS] \n" 959 | msgstr "" 960 | 961 | #: ../src/udevil.c:4981 962 | #, c-format 963 | msgid "" 964 | " {[-b|--block-device] DEVICE}|" 965 | "DIR\n" 966 | msgstr "" 967 | 968 | #: ../src/udevil.c:4982 969 | #, c-format 970 | msgid " UNMOUNT-OPTIONS:\n" 971 | msgstr "" 972 | 973 | #: ../src/udevil.c:4983 ../src/udevil.c:4995 974 | msgid "lazy unmount (see man umount)" 975 | msgstr "" 976 | 977 | #: ../src/udevil.c:4984 ../src/udevil.c:4996 978 | msgid "force unmount (see man umount)" 979 | msgstr "" 980 | 981 | #: ../src/udevil.c:4991 982 | #, c-format 983 | msgid "" 984 | "REMOVE - Unmount all partitions on host of DEVICE and prepare for safe\n" 985 | msgstr "" 986 | 987 | #: ../src/udevil.c:4992 988 | #, c-format 989 | msgid " removal (sync, stop, unbind driver, and power off):\n" 990 | msgstr "" 991 | 992 | #: ../src/udevil.c:4993 993 | #, c-format 994 | msgid "" 995 | " udevil remove|--remove|--detach [OPTIONS] [-b|--block-device] DEVICE\n" 996 | msgstr "" 997 | 998 | #: ../src/udevil.c:4994 999 | #, c-format 1000 | msgid " OPTIONS:\n" 1001 | msgstr "" 1002 | 1003 | #: ../src/udevil.c:4998 ../src/udevil.c:5002 ../src/udevil.c:5005 1004 | msgid "EXAMPLE" 1005 | msgstr "" 1006 | 1007 | #: ../src/udevil.c:5000 1008 | #, c-format 1009 | msgid "INFO - Show information about DEVICE emulating udisks v1 output:\n" 1010 | msgstr "" 1011 | 1012 | #: ../src/udevil.c:5001 1013 | #, c-format 1014 | msgid " udevil info|--show-info|--info [-b|--block-device] DEVICE\n" 1015 | msgstr "" 1016 | 1017 | #: ../src/udevil.c:5003 1018 | #, c-format 1019 | msgid "MONITOR - Display device events emulating udisks v1 output:\n" 1020 | msgstr "" 1021 | 1022 | #: ../src/udevil.c:5006 1023 | #, c-format 1024 | msgid "CLEAN - Remove unmounted udevil-created mount dirs in media dirs\n" 1025 | msgstr "" 1026 | 1027 | #: ../src/udevil.c:5008 1028 | #, c-format 1029 | msgid "HELP - Show this help\n" 1030 | msgstr "" 1031 | 1032 | #: ../src/udevil.c:5013 1033 | msgid "For config see" 1034 | msgstr "" 1035 | 1036 | #: ../src/udevil.c:5015 1037 | #, c-format 1038 | msgid "For automounting with udevil run 'devmon --help'\n" 1039 | msgstr "" 1040 | 1041 | #: ../src/udevil.c:5161 1042 | msgid "udevil: error 138: argument is not valid UTF-8\n" 1043 | msgstr "" 1044 | 1045 | #: ../src/udevil.c:5463 1046 | msgid "udevil: error 139: too many arguments\n" 1047 | msgstr "" 1048 | 1049 | #: ../src/udevil.c:5466 1050 | #, c-format 1051 | msgid "udevil: error 140: option '%s' requires an argument\n" 1052 | msgstr "" 1053 | 1054 | #: ../src/udevil.c:5470 1055 | #, c-format 1056 | msgid "udevil: error 141: invalid option '%s'\n" 1057 | msgstr "" 1058 | 1059 | #: ../src/udevil.c:5472 1060 | #, c-format 1061 | msgid "udevil: error 142: invalid or unexpected argument '%s'\n" 1062 | msgstr "" 1063 | -------------------------------------------------------------------------------- /po/update-pot: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script updates udevil.pot and modifies comments 4 | 5 | curdir=`pwd` 6 | if [ "$(basename "$curdir")" != "po" ] || [ ! -e POTFILES.in ]; then 7 | echo "udevil: update-pot: This script must be run from udevil's po subdirectory" 8 | exit 1 9 | fi 10 | 11 | # get configure version 12 | #AM_INIT_AUTOMAKE(udevil, 0.2.0) 13 | ver=`grep -m 1 "^AM_INIT_AUTOMAKE(udevil, .*" "../configure.ac" \ 14 | | sed "s/AM_INIT_AUTOMAKE(udevil, \(.*\))/\1/"` 15 | if [ "$ver" = "" ]; then 16 | echo "udevil: update-pot: cannot get configure.ac version" 17 | exit 1 18 | fi 19 | 20 | rm -f udevil.pot 21 | intltool-update --pot 22 | if [ $? -ne 0 ] || [ ! -s udevil.pot ]; then 23 | echo "udevil: update-pot: error creating udevil.pot" 24 | exit 2 25 | fi 26 | sed -i 's/# SOME DESCRIPTIVE TITLE\./# udevil PO Template http:\/\/ignorantguru.github.com\/udevil\//' udevil.pot 27 | sed -i "/# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER/d" udevil.pot 28 | sed -i 's/# This file is distributed under the same license as the PACKAGE package\./# This file is distributed under the same copyright and license as the udevil\x0A# package./' udevil.pot 29 | sed -i s/'"Project-Id-Version: PACKAGE VERSION\\n"'/"\"Project-Id-Version: udevil ${ver}\\\n\""/ udevil.pot 30 | sed -i s/'"POT-Creation-Date: .*\\n"'/"\"POT-Creation-Date: $(date -u '+%Y-%m-%d %H:%M+0000')\\\n\""/ udevil.pot 31 | 32 | head -n 20 udevil.pot 33 | 34 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | INCLUDES = -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ 2 | -DSYSCONFDIR=\""$(sysconfdir)"\" 3 | 4 | noinst_PROGRAMS = udevil 5 | 6 | udevil_SOURCES = udevil.c device-info.c canonicalize.c 7 | 8 | bin_SCRIPTS = devmon 9 | 10 | INSTALL_DIR = $(DESTDIR)/$(prefix)/bin 11 | INSTALL_SRC = $(top_builddir)/src 12 | 13 | install-data-hook: 14 | test -z $(INSTALL_DIR) || mkdir -p -- $(INSTALL_DIR) 15 | $(INSTALL_DATA) -o root -g root -m 4755 -D $(INSTALL_SRC)/udevil $(INSTALL_DIR)/udevil 16 | 17 | uninstall-hook: 18 | rm -f $(INSTALL_DIR)/udevil 19 | 20 | udevil_CFLAGS = \ 21 | @GLIB_CFLAGS@ \ 22 | @LIBUDEV_CFLAGS@ \ 23 | -Werror-implicit-function-declaration 24 | 25 | udevil_LDADD = \ 26 | $(INTLLIBS) \ 27 | @GLIB_LIBS@ \ 28 | @LIBUDEV_LIBS@ 29 | 30 | -------------------------------------------------------------------------------- /src/canonicalize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * canonicalize.c -- canonicalize pathname by removing symlinks 3 | * Copyright (C) 1993 Rick Sladkey 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU Library Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU Library Public License for more details. 14 | * 15 | */ 16 | 17 | /* 18 | * This routine is part of libc. We include it nevertheless, 19 | * since the libc version has some security flaws. 20 | * 21 | * TODO: use canonicalize_file_name() when exist in glibc 22 | */ 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | 30 | #include "canonicalize.h" 31 | 32 | #ifndef MAXSYMLINKS 33 | # define MAXSYMLINKS 256 34 | #endif 35 | 36 | static char * 37 | myrealpath(const char *path, char *resolved_path, int maxreslth) { 38 | int readlinks = 0; 39 | char *npath; 40 | char link_path[PATH_MAX+1]; 41 | int n; 42 | char *buf = NULL; 43 | 44 | npath = resolved_path; 45 | 46 | /* If it's a relative pathname use getcwd for starters. */ 47 | if (*path != '/') { 48 | if (!getcwd(npath, maxreslth-2)) 49 | return NULL; 50 | npath += strlen(npath); 51 | if (npath[-1] != '/') 52 | *npath++ = '/'; 53 | } else { 54 | *npath++ = '/'; 55 | path++; 56 | } 57 | 58 | /* Expand each slash-separated pathname component. */ 59 | while (*path != '\0') { 60 | /* Ignore stray "/" */ 61 | if (*path == '/') { 62 | path++; 63 | continue; 64 | } 65 | if (*path == '.' && (path[1] == '\0' || path[1] == '/')) { 66 | /* Ignore "." */ 67 | path++; 68 | continue; 69 | } 70 | if (*path == '.' && path[1] == '.' && 71 | (path[2] == '\0' || path[2] == '/')) { 72 | /* Backup for ".." */ 73 | path += 2; 74 | while (npath > resolved_path+1 && 75 | (--npath)[-1] != '/') 76 | ; 77 | continue; 78 | } 79 | /* Safely copy the next pathname component. */ 80 | while (*path != '\0' && *path != '/') { 81 | if (npath-resolved_path > maxreslth-2) { 82 | errno = ENAMETOOLONG; 83 | goto err; 84 | } 85 | *npath++ = *path++; 86 | } 87 | 88 | /* Protect against infinite loops. */ 89 | if (readlinks++ > MAXSYMLINKS) { 90 | errno = ELOOP; 91 | goto err; 92 | } 93 | 94 | /* See if last pathname component is a symlink. */ 95 | *npath = '\0'; 96 | n = readlink(resolved_path, link_path, PATH_MAX); 97 | if (n < 0) { 98 | /* EINVAL means the file exists but isn't a symlink. */ 99 | if (errno != EINVAL) 100 | goto err; 101 | } else { 102 | int m; 103 | char *newbuf; 104 | 105 | /* Note: readlink doesn't add the null byte. */ 106 | link_path[n] = '\0'; 107 | if (*link_path == '/') 108 | /* Start over for an absolute symlink. */ 109 | npath = resolved_path; 110 | else 111 | /* Otherwise back up over this component. */ 112 | while (*(--npath) != '/') 113 | ; 114 | 115 | /* Insert symlink contents into path. */ 116 | m = strlen(path); 117 | newbuf = malloc(m + n + 1); 118 | if (!newbuf) 119 | goto err; 120 | memcpy(newbuf, link_path, n); 121 | memcpy(newbuf + n, path, m + 1); 122 | free(buf); 123 | path = buf = newbuf; 124 | } 125 | *npath++ = '/'; 126 | } 127 | /* Delete trailing slash but don't whomp a lone slash. */ 128 | if (npath != resolved_path+1 && npath[-1] == '/') 129 | npath--; 130 | /* Make sure it's null terminated. */ 131 | *npath = '\0'; 132 | 133 | free(buf); 134 | return resolved_path; 135 | 136 | err: 137 | free(buf); 138 | return NULL; 139 | } 140 | 141 | /* 142 | * Converts private "dm-N" names to "/dev/mapper/" 143 | * 144 | * Since 2.6.29 (patch 784aae735d9b0bba3f8b9faef4c8b30df3bf0128) kernel sysfs 145 | * provides the real DM device names in /sys/block//dm/name 146 | */ 147 | char * 148 | canonicalize_dm_name(const char *ptname) 149 | { 150 | FILE *f; 151 | size_t sz; 152 | char path[256], name[256], *res = NULL; 153 | 154 | snprintf(path, sizeof(path), "/sys/block/%s/dm/name", ptname); 155 | if (!(f = fopen(path, "r"))) 156 | return NULL; 157 | 158 | /* read "\n" from sysfs */ 159 | if (fgets(name, sizeof(name), f) && (sz = strlen(name)) > 1) { 160 | name[sz - 1] = '\0'; 161 | snprintf(path, sizeof(path), "/dev/mapper/%s", name); 162 | res = strdup(path); 163 | } 164 | fclose(f); 165 | return res; 166 | } 167 | 168 | char * 169 | canonicalize_path(const char *path) 170 | { 171 | char canonical[PATH_MAX+2]; 172 | char *p; 173 | 174 | if (path == NULL) 175 | return NULL; 176 | 177 | if (!myrealpath(path, canonical, PATH_MAX+1)) 178 | return strdup(path); 179 | 180 | 181 | p = strrchr(canonical, '/'); 182 | if (p && strncmp(p, "/dm-", 4) == 0 && isdigit(*(p + 4))) { 183 | p = canonicalize_dm_name(p+1); 184 | if (p) 185 | return p; 186 | } 187 | 188 | return strdup(canonical); 189 | } 190 | 191 | 192 | #ifdef TEST_PROGRAM_CANONICALIZE 193 | int main(int argc, char **argv) 194 | { 195 | if (argc < 2) { 196 | fprintf(stderr, "usage: %s \n", argv[0]); 197 | exit(EXIT_FAILURE); 198 | } 199 | 200 | fprintf(stdout, "orig: %s\n", argv[1]); 201 | fprintf(stdout, "real: %s\n", canonicalize_path(argv[1])); 202 | 203 | exit(EXIT_SUCCESS); 204 | } 205 | #endif 206 | -------------------------------------------------------------------------------- /src/canonicalize.h: -------------------------------------------------------------------------------- 1 | #ifndef CANONICALIZE_H 2 | #define CANONICALIZE_H 3 | 4 | //#include "c.h" /* for PATH_MAX */ 5 | #include /* for PATH_MAX */ 6 | 7 | extern char *canonicalize_path(const char *path); 8 | extern char *canonicalize_dm_name(const char *ptname); 9 | 10 | #endif /* CANONICALIZE_H */ 11 | -------------------------------------------------------------------------------- /src/device-info.h: -------------------------------------------------------------------------------- 1 | #ifndef _DEVICE_INFO_H_ 2 | #define _DEVICE_INFO_H_ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | // glib 11 | #include 12 | 13 | // udev 14 | #include 15 | #include 16 | #include 17 | 18 | // intltool 19 | #include 20 | 21 | 22 | 23 | typedef struct device_t { 24 | struct udev_device *udevice; 25 | char *devnode; 26 | char *native_path; 27 | char *major; 28 | char *minor; 29 | char *mount_points; 30 | 31 | gboolean device_is_system_internal; 32 | gboolean device_is_partition; 33 | gboolean device_is_partition_table; 34 | gboolean device_is_removable; 35 | gboolean device_is_media_available; 36 | gboolean device_is_read_only; 37 | gboolean device_is_drive; 38 | gboolean device_is_optical_disc; 39 | gboolean device_is_mounted; 40 | char *device_presentation_hide; 41 | char *device_presentation_nopolicy; 42 | char *device_presentation_name; 43 | char *device_presentation_icon_name; 44 | char *device_automount_hint; 45 | char *device_by_id; 46 | guint64 device_size; 47 | guint64 device_block_size; 48 | char *id_usage; 49 | char *id_type; 50 | char *id_version; 51 | char *id_uuid; 52 | char *id_label; 53 | 54 | char *drive_vendor; 55 | char *drive_model; 56 | char *drive_revision; 57 | char *drive_serial; 58 | char *drive_wwn; 59 | char *drive_connection_interface; 60 | guint64 drive_connection_speed; 61 | char *drive_media_compatibility; 62 | char *drive_media; 63 | gboolean drive_is_media_ejectable; 64 | gboolean drive_can_detach; 65 | 66 | char *partition_scheme; 67 | char *partition_number; 68 | char *partition_type; 69 | char *partition_label; 70 | char *partition_uuid; 71 | char *partition_flags; 72 | char *partition_offset; 73 | char *partition_size; 74 | char *partition_alignment_offset; 75 | 76 | char *partition_table_scheme; 77 | char *partition_table_count; 78 | 79 | gboolean optical_disc_is_blank; 80 | gboolean optical_disc_is_appendable; 81 | gboolean optical_disc_is_closed; 82 | char *optical_disc_num_tracks; 83 | char *optical_disc_num_audio_tracks; 84 | char *optical_disc_num_sessions; 85 | } device_t; 86 | 87 | typedef struct devmount_t { 88 | guint major; 89 | guint minor; 90 | char *mount_points; 91 | GList* mounts; 92 | } devmount_t; 93 | 94 | device_t *device_alloc( struct udev_device *udevice ); 95 | void device_free( device_t *device ); 96 | gboolean device_get_info( device_t *device, GList* devmounts ); 97 | char* device_show_info( device_t *device ); 98 | 99 | #endif 100 | -------------------------------------------------------------------------------- /stamp-h1: -------------------------------------------------------------------------------- 1 | timestamp for config.h 2 | --------------------------------------------------------------------------------