Always try 'umount -i'
This commit is contained in:
parent
2b1f99b123
commit
9a3e7724be
@ -1,6 +1,10 @@
|
|||||||
ChangeLog for davfs2
|
ChangeLog for davfs2
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
2014-04-05 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
|
* umount_davfs.c:
|
||||||
|
Allways try 'umount -i'.
|
||||||
|
|
||||||
2014-04-05 Werner Baumann (werner.baumann@onlinehome.de)
|
2014-04-05 Werner Baumann (werner.baumann@onlinehome.de)
|
||||||
* configure.ac, src/Makefile.am, defaults.h,
|
* configure.ac, src/Makefile.am, defaults.h,
|
||||||
mount_davfs.h, mount_davfs.c:
|
mount_davfs.h, mount_davfs.c:
|
||||||
|
31
po/cs.po
31
po/cs.po
@ -7,7 +7,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: http://savannah.nongnu.org/support/?"
|
"Report-Msgid-Bugs-To: http://savannah.nongnu.org/support/?"
|
||||||
"func=additem&group=davfs2\n"
|
"func=additem&group=davfs2\n"
|
||||||
"POT-Creation-Date: 2014-04-05 20:13+0200\n"
|
"POT-Creation-Date: 2014-04-05 22:21+0200\n"
|
||||||
"PO-Revision-Date: 2007-05-03 19:50+0200\n"
|
"PO-Revision-Date: 2007-05-03 19:50+0200\n"
|
||||||
"Last-Translator: Vítězslav Kotrla <vitko@post.cz>\n"
|
"Last-Translator: Vítězslav Kotrla <vitko@post.cz>\n"
|
||||||
"Language-Team: <cs@li.org>\n"
|
"Language-Team: <cs@li.org>\n"
|
||||||
@ -636,12 +636,20 @@ msgstr ""
|
|||||||
" umount <mountpoint> : odpojit zdroj WebDAV tak, jak je určeno\n"
|
" umount <mountpoint> : odpojit zdroj WebDAV tak, jak je určeno\n"
|
||||||
" v /etc/fstab.\n"
|
" v /etc/fstab.\n"
|
||||||
|
|
||||||
#: src/umount_davfs.c:131
|
#: src/umount_davfs.c:135
|
||||||
#, c-format
|
#, fuzzy, c-format
|
||||||
msgid "can't determine mount point"
|
msgid ""
|
||||||
msgstr "nemohu určit přípojný bod"
|
"\n"
|
||||||
|
" can't evaluate PID file name;\n"
|
||||||
|
" trying to unmount anyway;\n"
|
||||||
|
" please wait for %s to terminate"
|
||||||
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
" nemohu číst PID ze souboru %s;\n"
|
||||||
|
" přesto se pokouším odpojit;\n"
|
||||||
|
" čekejte prosím, až %s skončí"
|
||||||
|
|
||||||
#: src/umount_davfs.c:151
|
#: src/umount_davfs.c:158
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -654,7 +662,7 @@ msgstr ""
|
|||||||
" přesto se pokouším odpojit;\n"
|
" přesto se pokouším odpojit;\n"
|
||||||
" čekejte prosím, až %s skončí"
|
" čekejte prosím, až %s skončí"
|
||||||
|
|
||||||
#: src/umount_davfs.c:163
|
#: src/umount_davfs.c:170
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -667,7 +675,7 @@ msgstr ""
|
|||||||
" přesto se pokouším odpojit;\n"
|
" přesto se pokouším odpojit;\n"
|
||||||
" čekejte prosím, až %s skončí"
|
" čekejte prosím, až %s skončí"
|
||||||
|
|
||||||
#: src/umount_davfs.c:179
|
#: src/umount_davfs.c:186
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -680,12 +688,12 @@ msgstr ""
|
|||||||
" přesto se pokouším odpojit.\n"
|
" přesto se pokouším odpojit.\n"
|
||||||
" pravděpodobně budete muset odstranit %s ručně"
|
" pravděpodobně budete muset odstranit %s ručně"
|
||||||
|
|
||||||
#: src/umount_davfs.c:190
|
#: src/umount_davfs.c:197
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: waiting while %s (pid %s) synchronizes the cache ."
|
msgid "%s: waiting while %s (pid %s) synchronizes the cache ."
|
||||||
msgstr "%s: čekám, než si %s (pid %s) sesynchronizuje vyrovnávací paměť."
|
msgstr "%s: čekám, než si %s (pid %s) sesynchronizuje vyrovnávací paměť."
|
||||||
|
|
||||||
#: src/umount_davfs.c:203
|
#: src/umount_davfs.c:210
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "an error occured while waiting; please wait for %s to terminate"
|
msgid "an error occured while waiting; please wait for %s to terminate"
|
||||||
msgstr "při čekání došlo k chybě; čekejte prosím až %s skončí"
|
msgstr "při čekání došlo k chybě; čekejte prosím až %s skončí"
|
||||||
@ -814,6 +822,9 @@ msgstr " identita: %s"
|
|||||||
msgid " accepted by user"
|
msgid " accepted by user"
|
||||||
msgstr " přijat uživatelem"
|
msgstr " přijat uživatelem"
|
||||||
|
|
||||||
|
#~ msgid "can't determine mount point"
|
||||||
|
#~ msgstr "nemohu určit přípojný bod"
|
||||||
|
|
||||||
#~ msgid "trying fuse kernel file system"
|
#~ msgid "trying fuse kernel file system"
|
||||||
#~ msgstr "zkouším jaderný souborový systém fuse"
|
#~ msgstr "zkouším jaderný souborový systém fuse"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ msgstr ""
|
|||||||
"Project-Id-Version: davfs2 1.4.6\n"
|
"Project-Id-Version: davfs2 1.4.6\n"
|
||||||
"Report-Msgid-Bugs-To: http://savannah.nongnu.org/support/?"
|
"Report-Msgid-Bugs-To: http://savannah.nongnu.org/support/?"
|
||||||
"func=additem&group=davfs2\n"
|
"func=additem&group=davfs2\n"
|
||||||
"POT-Creation-Date: 2014-04-05 20:13+0200\n"
|
"POT-Creation-Date: 2014-04-05 22:21+0200\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -574,12 +574,16 @@ msgid ""
|
|||||||
" /etc/fstab.\n"
|
" /etc/fstab.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/umount_davfs.c:131
|
#: src/umount_davfs.c:135
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "can't determine mount point"
|
msgid ""
|
||||||
|
"\n"
|
||||||
|
" can't evaluate PID file name;\n"
|
||||||
|
" trying to unmount anyway;\n"
|
||||||
|
" please wait for %s to terminate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/umount_davfs.c:151
|
#: src/umount_davfs.c:158
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -588,7 +592,7 @@ msgid ""
|
|||||||
" please wait for %s to terminate"
|
" please wait for %s to terminate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/umount_davfs.c:163
|
#: src/umount_davfs.c:170
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -597,7 +601,7 @@ msgid ""
|
|||||||
" please wait for %s to terminate"
|
" please wait for %s to terminate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/umount_davfs.c:179
|
#: src/umount_davfs.c:186
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -606,12 +610,12 @@ msgid ""
|
|||||||
" you propably have to remove %s manually"
|
" you propably have to remove %s manually"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/umount_davfs.c:190
|
#: src/umount_davfs.c:197
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: waiting while %s (pid %s) synchronizes the cache ."
|
msgid "%s: waiting while %s (pid %s) synchronizes the cache ."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/umount_davfs.c:203
|
#: src/umount_davfs.c:210
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "an error occured while waiting; please wait for %s to terminate"
|
msgid "an error occured while waiting; please wait for %s to terminate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
28
po/de.po
28
po/de.po
@ -8,8 +8,8 @@ msgstr ""
|
|||||||
"Project-Id-Version: davfs2 1.5.0\n"
|
"Project-Id-Version: davfs2 1.5.0\n"
|
||||||
"Report-Msgid-Bugs-To: http://savannah.nongnu.org/support/?"
|
"Report-Msgid-Bugs-To: http://savannah.nongnu.org/support/?"
|
||||||
"func=additem&group=davfs2\n"
|
"func=additem&group=davfs2\n"
|
||||||
"POT-Creation-Date: 2014-04-05 20:13+0200\n"
|
"POT-Creation-Date: 2014-04-05 22:21+0200\n"
|
||||||
"PO-Revision-Date: 2014-04-05 20:19+0200\n"
|
"PO-Revision-Date: 2014-04-05 22:23+0200\n"
|
||||||
"Last-Translator: Werner Baumann <werner.baumann@onlinehome.de>\n"
|
"Last-Translator: Werner Baumann <werner.baumann@onlinehome.de>\n"
|
||||||
"Language-Team: \n"
|
"Language-Team: \n"
|
||||||
"Language: de\n"
|
"Language: de\n"
|
||||||
@ -643,12 +643,20 @@ msgstr ""
|
|||||||
" umount <server-url> : hänge die WebDAV-Resource entsprechend den\n"
|
" umount <server-url> : hänge die WebDAV-Resource entsprechend den\n"
|
||||||
" Angaben in /etc/fstab aus.\n"
|
" Angaben in /etc/fstab aus.\n"
|
||||||
|
|
||||||
#: src/umount_davfs.c:131
|
#: src/umount_davfs.c:135
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "can't determine mount point"
|
msgid ""
|
||||||
msgstr "kann den Einhängepunkt nicht ermitteln"
|
"\n"
|
||||||
|
" can't evaluate PID file name;\n"
|
||||||
|
" trying to unmount anyway;\n"
|
||||||
|
" please wait for %s to terminate"
|
||||||
|
msgstr ""
|
||||||
|
"\n"
|
||||||
|
" kann den Namen der PID-Datei nicht ermitteln;\n"
|
||||||
|
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
||||||
|
" bitte warte bis der %s-Prozess endet"
|
||||||
|
|
||||||
#: src/umount_davfs.c:151
|
#: src/umount_davfs.c:158
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -661,7 +669,7 @@ msgstr ""
|
|||||||
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
||||||
" bitte warte bis der %s-Prozess endet"
|
" bitte warte bis der %s-Prozess endet"
|
||||||
|
|
||||||
#: src/umount_davfs.c:163
|
#: src/umount_davfs.c:170
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -674,7 +682,7 @@ msgstr ""
|
|||||||
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
||||||
" bitte warte bis der %s-Prozess endet"
|
" bitte warte bis der %s-Prozess endet"
|
||||||
|
|
||||||
#: src/umount_davfs.c:179
|
#: src/umount_davfs.c:186
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"\n"
|
"\n"
|
||||||
@ -687,14 +695,14 @@ msgstr ""
|
|||||||
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
" versuche trotzdem das Dateisystem auszuhängen;\n"
|
||||||
" %s muss wahrscheinlich von Hand gelöscht werden"
|
" %s muss wahrscheinlich von Hand gelöscht werden"
|
||||||
|
|
||||||
#: src/umount_davfs.c:190
|
#: src/umount_davfs.c:197
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: waiting while %s (pid %s) synchronizes the cache ."
|
msgid "%s: waiting while %s (pid %s) synchronizes the cache ."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"%s: warte bis %s (PID %s) die Dateien im Cache\n"
|
"%s: warte bis %s (PID %s) die Dateien im Cache\n"
|
||||||
"gesichert hat ."
|
"gesichert hat ."
|
||||||
|
|
||||||
#: src/umount_davfs.c:203
|
#: src/umount_davfs.c:210
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "an error occured while waiting; please wait for %s to terminate"
|
msgid "an error occured while waiting; please wait for %s to terminate"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -125,10 +125,19 @@ main(int argc, char *argv[])
|
|||||||
error(EXIT_FAILURE, 0, _("too many arguments"));
|
error(EXIT_FAILURE, 0, _("too many arguments"));
|
||||||
|
|
||||||
char *mpoint = canonicalize_file_name(argv[optind]);
|
char *mpoint = canonicalize_file_name(argv[optind]);
|
||||||
if (!mpoint)
|
|
||||||
mpoint = argv[optind];
|
char *umount_command = NULL;
|
||||||
if (!mpoint || *mpoint != '/')
|
if (mpoint) {
|
||||||
error(EXIT_FAILURE, errno, _("can't determine mount point"));
|
umount_command = ne_concat("umount -i '", mpoint, "'", NULL);
|
||||||
|
} else {
|
||||||
|
umount_command = ne_concat("umount -i '", argv[optind], "'", NULL);
|
||||||
|
error(0, 0,
|
||||||
|
_("\n"
|
||||||
|
" can't evaluate PID file name;\n"
|
||||||
|
" trying to unmount anyway;\n"
|
||||||
|
" please wait for %s to terminate"), PROGRAM_NAME);
|
||||||
|
return system(umount_command);
|
||||||
|
}
|
||||||
|
|
||||||
char *m = mpoint;
|
char *m = mpoint;
|
||||||
while (*m == '/')
|
while (*m == '/')
|
||||||
@ -142,8 +151,6 @@ main(int argc, char *argv[])
|
|||||||
char *pidfile = xasprintf("%s/%s.pid", DAV_SYS_RUN, mp);
|
char *pidfile = xasprintf("%s/%s.pid", DAV_SYS_RUN, mp);
|
||||||
free(mp);
|
free(mp);
|
||||||
|
|
||||||
char *umount_command = xasprintf("umount -i '%s'", mpoint);
|
|
||||||
|
|
||||||
char pid[32];
|
char pid[32];
|
||||||
FILE *file = fopen(pidfile, "r");
|
FILE *file = fopen(pidfile, "r");
|
||||||
if (!file || fscanf(file, "%30[0-9]", pid) < 1) {
|
if (!file || fscanf(file, "%30[0-9]", pid) < 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user