#!/usr/bin/perl # # plugin # | # +--rev (revision information) # | # +--tools # | # +--upgrade_script (one time use, executable) # | # +--TOOLS # | # +--plugin.conf (configuration information) # | # +--data # | | # | +--usr # | | # | +--lib (ln -s /data/usr/lib) # | | # | +--share (ln -s /data/usr/share) # | # +--sbin # | | # | +--tools_start (service start script, executable) # | # +--bin (ln -s * /bin) # | # +--etc (ln -s * /etc) # | # +--lib (ln -s * /lib) # | # +--libexec (ignored) # $df_cmd = "/bin/df"; $app_path = ""; # search installed path open(IN,"$df_cmd |"); while(){ if (/(VOLUME\d+)/) { if ( -d "/$1/PLUGINAPP/SSH" ) { $app_path = "/$1/PLUGINAPP/SSH"; last; } } } close(IN); #if ( $app_path eq "" ) { # die "Can't find the installation path!"; #} # At the moment, this is just a place holder, all the work is done # in tools_start.