--- eject-1.5.orig/eject.c +++ eject-1.5/eject.c @@ -66,6 +66,7 @@ int c_option = 0; /* choose to load a CD slot on a IDE/ATAPI changer */ int c_arg = 0; /* argument to -c option */ char device[1024]; /* device name */ +char orgdevice[1024]; /* original device name */ struct stat mystat; /* struct to help find out what type device we have */ /* data structure for device nicknames */ @@ -346,6 +347,7 @@ } if (v_option) printf("eject: `%s' is a link to `%s'\n", device, s2); + strncpy(orgdevice, device, sizeof(device)-1); strncpy(device, s2, sizeof(s2)-1); } @@ -414,7 +416,7 @@ fp = fopen("/etc/mtab", "r"); #endif while (fscanf(fp, "%s %s %s %s %s %s", s1, s2, dummy, dummy, dummy, dummy) >= 4) { - if (!strncmp(s1, device,8)) { + if (!strncmp(s1, orgdevice,8)) { if (!f_option && !u_option) { printf("eject: `%s' is mounted at `%s', not ejected\n", s1, s2); exit(1); --- eject-1.5.orig/debian/changelog +++ eject-1.5/debian/changelog @@ -0,0 +1,54 @@ +eject (1.5-5) unstable; urgency=low + + * Fix -u option when device was mounted as a symlink. (#12078) + + -- Martin Mitchell Wed, 10 Dec 1997 05:08:42 +1100 + +eject (1.5-4) unstable; urgency=low + + * Update to standards version 2.3.0.1. + + -- Martin Mitchell Wed, 26 Nov 1997 17:18:30 +1100 + +eject (1.5-3) unstable; urgency=low + + * New maintainer. + + -- Martin Mitchell Wed, 26 Nov 1997 17:05:32 +1100 + +eject (1.5-2.1) unstable; urgency=low + + * Non-maintainer release. + * Libc6 compile. + + -- Martin Mitchell Sat, 15 Nov 1997 01:56:15 +1100 + +eject (1.5-2) unstable; urgency=low + + * Change of maintainer + + -- Benedikt Eric Heinen Mon, 9 Jun 1997 06:39:57 +0200 + +eject (1.5-1) unstable; urgency=low + + * New upstream release + * debmake + + -- Christoph Lameter Sat, 8 Feb 1997 19:47:17 -0800 + +eject (1.4-2) unstable; urgency=low + + * Missing newline at the end of debian/control + + -- Christoph Lameter Sun, 15 Sep 1996 14:51:46 +0800 + +eject (1.4-1) unstable; urgency=low + + * Initial Release + + -- Christoph Lameter Sun, 15 Sep 1996 14:51:46 +0800 + +Local variables: +mode: debian-changelog +End: + --- eject-1.5.orig/debian/control +++ eject-1.5/debian/control @@ -0,0 +1,18 @@ +Source: eject +Section: misc +Priority: optional +Maintainer: Martin Mitchell +Standards-Version: 2.3.0.1 + +Package: eject +Architecture: any +Depends: ${shlibs:Depends} +Description: ejects CDs and operates CD-Changers under Linux + This little program will eject CD-ROMs (assuming your drive supports + the CDROMEJECT ioctl). It also allows setting the autoeject feature, + currently supported by a number of the Linux CD-ROM drivers. See the + documentation in /usr/src/linux/Documentation for more information on + the autoeject feature. + . + On supported ATAPI/IDE multi-disc CD-ROM changers, it allows changing + the active disc --- eject-1.5.orig/debian/copyright +++ eject-1.5/debian/copyright @@ -0,0 +1,5 @@ +This package was found on + +sunsite.unc.edu:/pub/Linux/utils/disk-management + +This package is covered by the GPL - for details see /usr/doc/copyright/GPL.gz. --- eject-1.5.orig/debian/rules +++ eject-1.5/debian/rules @@ -0,0 +1,70 @@ +#!/usr/bin/make -f +# Sample debian.rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified + +# There used to be `source' and `diff' targets in this file, and many +# packages also had `changes' and `dist' targets. These functions +# have been taken over by dpkg-source, dpkg-genchanges and +# dpkg-buildpackage in a package-independent way, and so these targets +# are obsolete. + +package=eject +STRIP=strip + +build: + $(checkdir) + $(MAKE) + touch build + +clean: + $(checkdir) + -rm -f build + -$(MAKE) clean + -rm `find . -name "*~"` + -rm -rf debian/tmp debian/files* debian/substvars + +binary-indep: checkroot build + $(checkdir) +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp + install -d debian/tmp/DEBIAN debian/tmp/usr/bin debian/tmp/usr/doc/eject debian/tmp/usr/man/man1 + install -m 755 eject debian/tmp/usr/bin/eject + install -m 644 eject.1 debian/tmp/usr/man/man1 + $(STRIP) debian/tmp/usr/bin/eject + gzip -9v debian/tmp/usr/man/man1/* + cp ChangeLog README debian/tmp/usr/doc/eject + cp debian/changelog debian/tmp/usr/doc/eject/changelog.Debian + gzip -9v debian/tmp/usr/doc/eject/* + cp debian/copyright debian/tmp/usr/doc/eject + dpkg-shlibdeps debian/tmp/usr/bin/eject + dpkg-gencontrol + chown -R root.root debian/tmp + chmod -R g-ws debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f $(package).c -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot