Commit 80b63b85 authored by claes's avatar claes

authorized_keys file included in distribution package

parent d62c91d4
/*
* Proview $Id: wb_lfu.cpp,v 1.17 2008-06-25 07:56:00 claes Exp $
* Proview $Id: wb_lfu.cpp,v 1.18 2008-06-26 13:20:41 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -1996,7 +1996,7 @@ pwr_tStatus lfu_SaveDirectoryVolume(
switch ( cid) {
case pwr_cClass_Distribute: {
lfu_mDistrComponents *components_ptr;
pwr_mDistrComponentMask *components_ptr;
sts = ldh_ObjidToName( ldhses, applobjid, ldh_eName_Object,
appl_name, sizeof(appl_name), &size);
......@@ -2007,45 +2007,48 @@ pwr_tStatus lfu_SaveDirectoryVolume(
"Components", (char **)&components_ptr, &size);
if (EVEN(sts)) return sts;
if ( *components_ptr & lfu_mDistrComponents_LoadFiles &&
if ( *components_ptr & pwr_mDistrComponentMask_LoadFiles &&
!(distr_options & lfu_mDistrOpt_NoRootVolume)) {
fprintf( file, "load %s\n", nodename_ptr);
}
if ( *components_ptr & lfu_mDistrComponents_UserDatabase)
fprintf( file, "appl %s W $pwrp_src/%s/pwr_user.dat:$pwra_db/pwr_user.dat $pwra_db/pwr_user.dat\n",
if ( *components_ptr & pwr_mDistrComponentMask_UserDatabase)
fprintf( file, "appl %s W $pwrp_src/%s/pwr_user2.dat:$pwra_db/pwr_user2.dat $pwra_db/pwr_user2.dat\n",
nodename_ptr, nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_ApplFile)
if ( *components_ptr & pwr_mDistrComponentMask_ApplFile)
fprintf( file, "appl %s W "load_cNameAppl"\n",
nodename_ptr, "$pwrp_load/", nodename_ptr, *bus_number_ptr);
if ( *components_ptr & lfu_mDistrComponents_PwrpAliasFile)
if ( *components_ptr & pwr_mDistrComponentMask_PwrpAliasFile)
fprintf( file, "appl %s W $pwrp_load/pwrp_alias.dat $pwrp_load/pwrp_alias.dat\n",
nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_IncludeFiles)
if ( *components_ptr & pwr_mDistrComponentMask_IncludeFiles)
fprintf( file, "appl %s W $pwrp_inc/*.h\n", nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_GraphFiles)
if ( *components_ptr & pwr_mDistrComponentMask_GraphFiles)
fprintf( file, "appl %s W $pwrp_exe/*.pwg\n", nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_XttHelpFile)
if ( *components_ptr & pwr_mDistrComponentMask_XttHelpFile)
fprintf( file, "appl %s W $pwrp_src/%s/xtt_help.dat:$pwrp_exe/xtt_help.dat $pwrp_exe/xtt_help.dat\n",
nodename_ptr, nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_XttResourceFile)
if ( *components_ptr & pwr_mDistrComponentMask_XttResourceFile)
fprintf( file, "appl %s W $pwrp_src/%s/Rt_xtt:$pwrp_pop/Rt_xtt /home/b55/Rt_xtt\n",
nodename_ptr, nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_XttSetupFile)
if ( *components_ptr & pwr_mDistrComponentMask_XttSetupFile)
fprintf( file, "appl %s W $pwrp_src/%s/xtt_setup.rtt_com:$pwrp_pop/xtt_setup.rtt_com /home/b55/xtt_setup.rtt_com\n",
nodename_ptr, nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_FlowFiles)
if ( *components_ptr & pwr_mDistrComponentMask_FlowFiles)
fprintf( file, "appl %s W $pwrp_load/*.flw\n", nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_RHostsFile)
if ( *components_ptr & pwr_mDistrComponentMask_RHostsFile)
fprintf( file, "appl %s W $pwrp_src/%s/.rhosts:$pwra_db/.rhosts /home/pwrp/.rhosts\n",
nodename_ptr, nodename_ptr);
if ( *components_ptr & lfu_mDistrComponents_WebFiles) {
if ( *components_ptr & pwr_mDistrComponentMask_AuthorizedKeysFile)
fprintf( file, "appl %s W $pwrp_src/%s/authorized_keys:$pwra_db/authorized_keys /home/pwrp/.ssh/authorized_keys\n",
nodename_ptr, nodename_ptr);
if ( *components_ptr & pwr_mDistrComponentMask_WebFiles) {
fprintf( file, "appl %s W $pwrp_web/*.html\n", nodename_ptr);
fprintf( file, "appl %s W $pwrp_web/*.jar\n", nodename_ptr);
fprintf( file, "appl %s S $pwrp_web/*.gif\n", nodename_ptr);
fprintf( file, "appl %s S $pwrp_web/*.jpg\n", nodename_ptr);
fprintf( file, "appl %s S $pwrp_web/*.pdf\n", nodename_ptr);
}
if ( *components_ptr & lfu_mDistrComponents_PwrpStop)
if ( *components_ptr & pwr_mDistrComponentMask_PwrpStop)
fprintf( file, "appl %s W $pwrp_src/%s/pwrp_stop.sh:$pwrp_exe/pwrp_stop.sh $pwrp_exe/pwrp_stop.sh\n",
nodename_ptr, nodename_ptr);
......
/*
* Proview $Id: wb_lfu.h,v 1.11 2008-06-25 07:56:04 claes Exp $
* Proview $Id: wb_lfu.h,v 1.12 2008-06-26 13:20:41 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -37,22 +37,6 @@ typedef enum {
lfu_mDistrOpt_RSH = 1 << 1
} lfu_mDistrOpt;
typedef enum {
lfu_mDistrComponents_UserDatabase = 1 << 0,
lfu_mDistrComponents_LoadFiles = 1 << 1,
lfu_mDistrComponents_ApplFile = 1 << 2,
lfu_mDistrComponents_PwrpAliasFile = 1 << 3,
lfu_mDistrComponents_IncludeFiles = 1 << 4,
lfu_mDistrComponents_GraphFiles = 1 << 5,
lfu_mDistrComponents_XttHelpFile = 1 << 6,
lfu_mDistrComponents_XttResourceFile = 1 << 7,
lfu_mDistrComponents_XttSetupFile = 1 << 8,
lfu_mDistrComponents_FlowFiles = 1 << 9,
lfu_mDistrComponents_RHostsFile = 1 << 10,
lfu_mDistrComponents_WebFiles = 1 << 11,
lfu_mDistrComponents_PwrpStop = 1 << 12
} lfu_mDistrComponents;
typedef enum {
lfu_eAccessType_StdLgi = 0,
lfu_eAccessType_Proxy = 1,
......
/*
* Proview $Id: wb_pkg.cpp,v 1.17 2008-06-25 07:56:13 claes Exp $
* Proview $Id: wb_pkg.cpp,v 1.18 2008-06-26 13:20:41 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -460,7 +460,10 @@ void pkg_node::fetchFiles( bool distribute)
"cd /tmp" << endl <<
"echo \"-- Unpack package " << pkg_name << "\"" << endl <<
"tar -xzf /home/pwrp/" << pkg_name << endl <<
"echo \"-- Move files to target directories\"" << endl;
"echo \"-- Move files to target directories\"" << endl <<
"if [ ! -e /home/pwrp/.ssh ]; then" << endl <<
" mkdir /home/pwrp/.ssh" << endl <<
"fi" << endl;
for ( int i = 0; i < (int)m_filelist.size(); i++)
ofu <<
......@@ -487,6 +490,10 @@ void pkg_node::fetchFiles( bool distribute)
" sudo chown pwrp /home/pwrp/.rhosts" << endl <<
" sudo chmod g-w /home/pwrp/.rhosts" << endl <<
" fi" << endl <<
" if [ -e /home/pwrp/.ssh/authorized_keys ]; then" << endl <<
" sudo chown pwrp /home/pwrp/.ssh/authorized_keys" << endl <<
" sudo chmod g-w /home/pwrp/.ssh/authorized_keys" << endl <<
" fi" << endl <<
"fi" << endl;
ofu.close();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment