Skip to content

Commit

Permalink
fix old account mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandredevely authored Jan 31, 2024
1 parent dafcc0a commit 3bb325b
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions make.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,15 @@ function makedockerfile(e) {

// make sure that we are root to run the commands :
wstream.write( "USER root\n" );
if (release == '3.1' ) {
wstream.write( "RUN mkdir -p /etc/localaccount\n" );
wstream.write( "RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f /etc/localaccount; rm -f /etc/$f; ln -s /etc/localaccount/$f /etc/$f; fi; done\n" );
}
else {
wstream.write( "RUN mkdir -p /var/secrets/abcdesktop/localaccount\n" );
wstream.write( "RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f /var/secrets/abcdesktop/localaccount; rm -f /etc/$f; ln -s /var/secrets/abcdesktop/localaccount/$f /etc/$f; fi; done\n" );
}

wstream.write( "RUN mkdir -p /etc/localaccount\n" );
wstream.write( "RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f /etc/localaccount; rm -f /etc/$f; ln -s /etc/localaccount/$f /etc/$f; fi; done\n" );

// old account mapping
// wstream.write( "RUN mkdir -p /var/secrets/abcdesktop/localaccount\n" );
// wstream.write( "RUN for f in passwd shadow group gshadow ; do if [ -f /etc/$f ] ; then cp /etc/$f /var/secrets/abcdesktop/localaccount; rm -f /etc/$f; ln -s /var/secrets/abcdesktop/localaccount/$f /etc/$f; fi; done\n" );
//

let user=(e.user)?(e.user):'balloon';
wstream.write(`USER ${user}\n`);

Expand Down

0 comments on commit 3bb325b

Please sign in to comment.