summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-09-06 10:41:18 -0400
committerAlex Xu (Hello71) <alex_y_xu@yahoo.ca>2018-09-06 10:43:32 -0400
commitcba728f142fc7fa7219d1be49c8cb4aada4309f3 (patch)
tree062611d26fec0a47a07090865c632225e0947c8a
parent42cae09331fe54d0e2d720b671fee101322f9602 (diff)
downloadrandom-seed-cba728f142fc7fa7219d1be49c8cb4aada4309f3.tar.xz
random-seed-cba728f142fc7fa7219d1be49c8cb4aada4309f3.zip
Stuff.
-rw-r--r--Makefile.in7
-rw-r--r--configure.ac11
-rw-r--r--src/id.c4
3 files changed, 13 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index 2e35bae..099a89a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -66,18 +66,21 @@ endif
@mkdir -p $(@D)
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
-%: %.in Makefile
+systemd/random-seed.service systemd/random-seed-save.service: Makefile
@mkdir -p $(@D)
sed -e 's|@sbindir[@]|$(sbindir)|g' \
-e 's|@default_seed_path_dir[@]|$(default_seed_path_dir)|g' \
$< > $@
+systemd/random-seed.service: systemd/random-seed.service.in
+systemd/random-seed-save.service: systemd/random-seed-save.service.in
+
install: all
install -D -m755 random-seed $(DESTDIR)$(sbindir)/random-seed
install -D -m644 $(srcdir)/doc/random-seed.8 $(DESTDIR)$(mandir)/man8/random-seed.8
ifneq ($(systemdsystemunitdir),)
install -D -m644 systemd/random-seed.service $(DESTDIR)$(systemdsystemunitdir)/random-seed.service
- install -D -m644 $(srcdir)/systemd/random-seed-save.service $(DESTDIR)$(systemdsystemunitdir)/random-seed-save.service
+ install -D -m644 systemd/random-seed-save.service $(DESTDIR)$(systemdsystemunitdir)/random-seed-save.service
install -D -m644 $(srcdir)/systemd/random-seed-save.timer $(DESTDIR)$(systemdsystemunitdir)/random-seed-save.timer
endif
diff --git a/configure.ac b/configure.ac
index e3ceb75..b802932 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,8 +10,10 @@ AS_IF([test "$ac_cv_prog_cc_c99" = no], [
AC_MSG_ERROR([a C99 compatible compiler is required])
])
+AX_GCC_FUNC_ATTRIBUTE(fallthrough)
+
AC_ARG_ENABLE(unity,
- AC_HELP_STRING(--enable-unity, [enable unity build (similar to sqlite amalgamation) [yes]]),
+ AC_HELP_STRING(--enable-unity, [enable unity build (similar to sqlite amalgamation, increases performance) [yes]]),
[enable_unity=$enableval],
[enable_unity=yes]
)
@@ -69,12 +71,11 @@ AS_IF([test "$with_util_linux" = yes], [
PKG_CHECK_VAR(SYSTEMDSYSTEMUNITDIR, systemd, systemdsystemunitdir)
-machine_id_paths_default=/etc/machine-id:/var/lib/dbus/machine-id
AC_ARG_VAR([MACHINE_ID_PATHS],
- [manually specify machine-id location (colon separated list, values must not contain backslashes or quotes) [$machine_id_paths_default]]
+ [manually specify machine-id location (colon separated list, values must not contain backslashes or quotes) [/etc/machine-id:/var/lib/dbus/machine-id]]
)
machine_id_paths_c=`
- printf '%s\n' "${MACHINE_ID_PATHS-$machine_id_paths_default}" |
+ printf '%s\n' "${MACHINE_ID_PATHS-/etc/machine-id:/var/lib/dbus/machine-id}" |
sed -e '
s/^/{"/
s/:/", "/g
@@ -92,8 +93,6 @@ AC_DEFINE_UNQUOTED(DEFAULT_SEED_PATH, "$DEFAULT_SEED_PATH", [default seed path])
DEFAULT_SEED_PATH_DIR=${DEFAULT_SEED_PATH%/*}
AC_SUBST(DEFAULT_SEED_PATH_DIR)
-AX_GCC_FUNC_ATTRIBUTE(fallthrough)
-
AX_APPEND_FLAG(-D_GNU_SOURCE, CPPFLAGS)
AX_APPEND_FLAG(-D_DEFAULT_SOURCE, CPPFLAGS)
AX_APPEND_FLAG(-D_POSIX_C_SOURCE=200809L, CPPFLAGS)
diff --git a/src/id.c b/src/id.c
index 0a37ba5..9e5de8a 100644
--- a/src/id.c
+++ b/src/id.c
@@ -79,7 +79,9 @@ const char *get_drive_id(struct random_seed *rs) {
#ifdef HAVE_UTIL_LINUX
const char *get_fs_uuid_util_linux(struct random_seed *rs) {
- return "fake uuid";
+ (void)rs;
+ fputs("error: util linux not implemented\n", stderr);
+ return NULL;
}
#endif