Linux HOWTOs

About | Home | Search


HOWTO: sysfsutils
Description: Library and utility for Linux's sysfs
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# sysfsutils 2.1.0
# ================
cd
test -f installed/sysfsutils-2.1.0.tar.gz &&
 mv installed/sysfsutils-2.1.0.tar.gz .
test ! -f sysfsutils-2.1.0.tar.gz &&
 wget http://download.sf.net/linux-diag/sysfsutils-2.1.0.tar.gz
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "sysfsutils-*" -exec rm -r {} \;
tar xzvf ~/sysfsutils-2.1.0.tar.gz
cd sysfsutils-2.1.0
test $UID = 0 && chown -R root:root .
./configure
make
su -c "make install ; ldconfig"
cd
mkdir -p -m 0700 installed
rm -f installed/sysfsutils-*.tar.*
mv sysfsutils-2.1.0.tar.gz installed/


# If you ever need to uninstall sysfsutils, this should do it:
cd
su
test -d src/sysfsutils-2.1.0 &&
 ( cd src/sysfsutils-2.1.0 ; make uninstall )
( cd /usr/local/bin ; rm -f dlist_test get_bus_devices_list \
 get_class_dev get_classdev_parent get_device get_driver \
 systool testlibsysfs write_attr )
( cd /usr/include/sysfs ; rm -f dlist.h libsysfs.h )
rm -f /usr/local/lib/libsysfs.* /usr/local/man/man1/systool.1
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "sysfsutils-*" -exec rm -r {} \;
rm -f ~/installed/sysfsutils-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>