aboutsummaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>1998-03-29 10:26:20 +0000
committerH. Peter Anvin <hpa@zytor.com>1998-03-29 10:26:20 +0000
commite1dbb9fe60aa8bf48b07ce2896838f76cc98e226 (patch)
tree87f278ba5cb3d2738aa2061a17a01a18474dfe7e /daemon
parent43d9d88fd0160c7beecba8b78227cc7247e8d6e9 (diff)
downloadautofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.tar.gz
autofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.tar.xz
autofs3-e1dbb9fe60aa8bf48b07ce2896838f76cc98e226.zip
Make autofs self-configuring (using autoconf)
Diffstat (limited to 'daemon')
-rw-r--r--daemon/Makefile7
-rw-r--r--daemon/automount.c8
2 files changed, 8 insertions, 7 deletions
diff --git a/daemon/Makefile b/daemon/Makefile
index c605261..6bb89b9 100644
--- a/daemon/Makefile
+++ b/daemon/Makefile
@@ -3,11 +3,12 @@
# Makefile for autofs
#
+include ../Makefile.conf
+include ../Makefile.rules
+
SRCS = automount.c spawn.c module.c mount.c
OBJS = automount.o spawn.o module.o mount.o
-include ../Makefile.rules
-
version := $(shell cat ../.version)
CFLAGS += -rdynamic -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" -DVERSION_STRING=\"$(version)\" -I../include
@@ -24,6 +25,6 @@ clean:
rm -f *.o *.s automount
install: all
- install -c automount -m 755 -o root $(sbindir)
+ install -c automount -m 755 $(INSTALLROOT)$(sbindir)
diff --git a/daemon/automount.c b/daemon/automount.c
index f51b8dc..35b53ea 100644
--- a/daemon/automount.c
+++ b/daemon/automount.c
@@ -87,8 +87,8 @@ static int umount_ent(char *root, char *name)
if ( !lstat(path_buf,&st) ) {
if ( S_ISDIR(st.st_mode) ) {
if ( st.st_dev != ap.dev ) {
- rv = spawnl(LOG_NOTICE, _PATH_UMOUNT,
- _PATH_UMOUNT, path_buf, NULL);
+ rv = spawnl(LOG_DEBUG, PATH_UMOUNT,
+ PATH_UMOUNT, path_buf, NULL);
if ( !rv )
rmdir(path_buf);
} else
@@ -146,7 +146,7 @@ static int do_umount_autofs(void)
}
if (ap.pipefd >= 0)
close(ap.pipefd);
- rv = spawnl(LOG_ERR, _PATH_UMOUNT, _PATH_UMOUNT, ap.path, NULL);
+ rv = spawnl(LOG_ERR, PATH_UMOUNT, PATH_UMOUNT, ap.path, NULL);
if (rv == 0 && submount)
rmdir(ap.path);
@@ -240,7 +240,7 @@ static int mount_autofs(char *path)
(unsigned)my_pgrp, AUTOFS_PROTO_VERSION);
sprintf(our_name, "automount(pid%u)", (unsigned)my_pid);
- if ( spawnl(LOG_CRIT, _PATH_MOUNT, _PATH_MOUNT, "-t", "autofs", "-o",
+ if ( spawnl(LOG_CRIT, PATH_MOUNT, PATH_MOUNT, "-t", "autofs", "-o",
options, our_name, path, NULL) ) {
close(pipefd[0]);
close(pipefd[1]);