source: scripts/patches/module-init-tools-3.0-cross-moveold.patch@ 1cca9e2

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 1cca9e2 was 7f65c0e, checked in by Jim Gifford <clfs@…>, 19 years ago

r625@server (orig r623): jim | 2005-10-31 12:43:24 -0800
Final Move

  • Property mode set to 100644
File size: 2.6 KB
RevLine 
[617118d]1--- module-init-tools-3.0-ORIG/Makefile.in 2004-02-24 11:49:35.000000000 +1100
2+++ module-init-tools-3.0/Makefile.in 2004-04-12 15:39:35.000000000 +1000
3@@ -760,17 +760,10 @@
4
5 release: check clean tarball testsuite
6
7-moveold: check-for-sbin check-for-old move-old-targets
8-
9-check-for-sbin:
10- if [ "`echo $(DESTDIR)$(sbindir) | tr -s / /`" = /sbin ]; then :; \
11- else \
12- echo moveold usually only makes sense when installing into /sbin; \
13- exit 1; \
14- fi
15+moveold: check-for-old move-old-targets
16
17 check-for-old:
18- if [ -f /sbin/lsmod.old ]; then \
19+ if [ -f $(DESTDIR)/sbin/lsmod.old ]; then \
20 echo Someone already moved old versions. >&2; exit 1; \
21 fi
22
23@@ -779,26 +772,29 @@
24 # Also, make symlink from /bin to /sbin for lsmod (FHS compliant).
25 move-old-targets:
26 for f in lsmod modprobe rmmod depmod insmod modinfo; do \
27- if [ -L /sbin/$$f ]; then \
28- ln -sf `ls -l /sbin/$$f | sed 's/.* -> //'`.old /sbin/$$f; \
29+ if [ -L $(DESTDIR)/sbin/$$f ]; then \
30+ ln -sf `ls -l $(DESTDIR)/sbin/$$f | sed 's/.* -> //'`.old \
31+ $(DESTDIR)/sbin/$$f; \
32 fi; \
33- mv /sbin/$$f /sbin/$$f.old; \
34- if [ -f /usr/share/man/man8/$$f.8.gz ]; then \
35- mv /usr/share/man/man8/$$f.8.gz \
36- /usr/share/man/man8/$$f.old.8.gz; \
37- elif [ -f /usr/share/man/man8/$$f.8.bz2 ]; then \
38- mv /usr/share/man/man8/$$f.8.bz2 \
39- /usr/share/man/man8/$$f.old.8.bz2; \
40+ mv $(DESTDIR)/sbin/$$f $(DESTDIR)/sbin/$$f.old; \
41+ if [ -f $(DESTDIR)/usr/share/man/man8/$$f.8.gz ]; then \
42+ mv $(DESTDIR)/usr/share/man/man8/$$f.8.gz \
43+ $(DESTDIR)/usr/share/man/man8/$$f.old.8.gz; \
44+ elif [ -f $(DESTDIR)/usr/share/man/man8/$$f.8.bz2 ]; then \
45+ mv $(DESTDIR)/usr/share/man/man8/$$f.8.bz2 \
46+ $(DESTDIR)/usr/share/man/man8/$$f.old.8.bz2; \
47 else \
48- mv /usr/share/man/man8/$$f.8 /usr/share/man/man8/$$f.old.8; \
49+ mv $(DESTDIR)/usr/share/man/man8/$$f.8 \
50+ $(DESTDIR)/usr/share/man/man8/$$f.old.8; \
51 fi; \
52 done
53 for f in kallsyms ksyms; do \
54- if [ -L /sbin/$$f ]; then \
55- ln -sf `ls -l /sbin/$$f | sed 's/.* -> //'`.old /sbin/$$f; \
56+ if [ -L $(DESTDIR)/sbin/$$f ]; then \
57+ ln -sf `ls -l $(DESTDIR)/sbin/$$f | sed 's/.* -> //'`.old \
58+ $(DESTDIR)/sbin/$$f; \
59 fi; \
60 done
61- ln -s /sbin/lsmod.old /bin/lsmod.old
62+ ln -s /sbin/lsmod.old $(DESTDIR)/bin/lsmod.old
63
64 # For installs in /usr/local/sbin
65 links:
Note: See TracBrowser for help on using the repository browser.