Changeset 3356
- Timestamp:
- 06/06/11 18:37:53 (2 years ago)
- Location:
- trunk/smartmontools
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/smartmontools/CHANGELOG
r3355 r3356 41 41 <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> 42 42 43 [CF] Re-enable '--with-initscriptdir=auto' as default. 44 Change search for initddir and systemdsystemunitdir such that 45 default ./configure does never overwrite system files. 46 43 47 [MS] drivedb.h update: 44 48 disentangle Transcend SSD versions -
trunk/smartmontools/INSTALL
r3352 r3356 689 689 Contents of smartd/smartd.conf man pages; 690 690 Directory for rc.d/init.d/smartd init script 691 --with-initscriptdir no Location of init scripts, use "auto" to autodetect691 --with-initscriptdir auto Location of init scripts 692 692 --with-systemdsystemunitdir auto Location of systemd service files 693 693 --with-docdir ${prefix}/share/doc/smartmontools Location of the documentation … … 713 713 new --docdir option added in autoconf 2.60. 714 714 715 The defaults for --with-initscriptdir and --with-systemdsystemunitdir are 716 guessed such that the following rules apply: 717 - If --prefix=/usr --sysconfdir=/etc is specified, the guessed directories 718 should be the defaults used by the current OS or distribution. 719 - If --sysconfdir=/etc is NOT specified, the guessed directories should 720 always be below ${prefix} or below ${sysconfdir}. 721 715 722 Here's an example: 716 723 If you set --prefix=/home/joe and none of the other four 717 724 variables then the different directories that are used would be: 718 725 --sbindir /home/joe/sbin 726 --docdir /home/joe/share/doc/smartmontools 719 727 --mandir /home/joe/share/man 720 728 --sysconfdir /home/joe/etc 721 --with-initscriptdir [disabled] 722 --with-docdir /home/joe/doc/smartmontools 729 --with-exampledir /home/joe/share/doc/smartmontools/examplescripts 730 --with-drivedbdir /home/joe/share/smartmontools 731 --with-initscriptdir [see below] 732 --with-systemdsystemunitdir [see below] 733 734 If systemd is present (and pkg-config reports /lib/systemd/system 735 as the systemdsystemunitdir): 736 737 --with-initscriptdir [disabled] 738 --with-systemdsystemunitdir /home/joe/lib/systemd/system 739 740 else if /etc/rc.d/init.d exists: 741 742 --with-initscriptdir /home/joe/etc/rc.d/init.d 743 --with-systemdsystemunitdir [disabled] 744 745 else if /etc/init.d exists: 746 747 --with-initscriptdir /home/joe/etc/init.d 748 --with-systemdsystemunitdir [disabled] 749 750 else if /etc/rc.d exists: 751 752 --with-initscriptdir /home/joe/etc/rc.d 753 --with-systemdsystemunitdir [disabled] 754 755 else 756 757 --with-initscriptdir [disabled] 758 --with-systemdsystemunitdir [disabled] 723 759 724 760 This is useful for test installs in a harmless subdirectory somewhere. -
trunk/smartmontools/configure.in
r3352 r3356 174 174 auto|yes) 175 175 test -n "$PKG_CONFIG" && systemdsystemunitdir=`$PKG_CONFIG --variable=systemdsystemunitdir systemd` 176 if test "$with_systemdsystemunitdir" = "yes" && test -z "$systemdsystemunitdir"; then 177 AC_MSG_ERROR([Location of systemd service files not found]) 178 fi ;; 176 case "$with_systemdsystemunitdir:$sysconfdir:$systemdsystemunitdir" in 177 yes:*:) AC_MSG_ERROR([Location of systemd service files not found]) ;; 178 yes:*:*|auto:*:|auto:/etc:*) ;; 179 *) systemdsystemunitdir='${prefix}'$systemdsystemunitdir ;; 180 esac ;; 179 181 no) ;; 180 182 *) systemdsystemunitdir="$with_systemdsystemunitdir" ;; … … 184 186 185 187 AC_ARG_WITH(initscriptdir, 186 [AC_HELP_STRING([--with-initscriptdir =DIR],[Location of the init script])],187 [], [with_initscriptdir= no])188 [AC_HELP_STRING([--with-initscriptdir@<:@=DIR|auto|yes|no@:>@], [Location of init scripts [auto]])], 189 [], [with_initscriptdir=auto]) 188 190 189 191 AC_MSG_CHECKING(which init (rc) directory to use) 190 192 initddir="" 191 for initdir in /etc/init.d /etc/rc.d/init.d /sbin/init.d \ 192 /usr/local/etc/rc.d /etc/rc.d 193 do 194 if 195 test -d $initdir 196 then 197 initddir=$initdir 193 for dir in rc.d/init.d init.d rc.d; do 194 if test -d /etc/$dir; then 195 initddir='${sysconfdir}'/$dir 198 196 break 199 197 fi … … 203 201 case "$with_initscriptdir" in 204 202 auto) test -n "$systemdsystemunitdir" && initddir= ;; 205 yes) ;; 203 yes) 204 if test -z "$initddir"; then 205 AC_MSG_ERROR([Location of init scripts not found]) 206 fi ;; 206 207 no) initddir= ;; 207 208 *) initddir="$with_initscriptdir" ;;