mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-24 07:01:13 +02:00
move enable_localaccount.sh, make pam_offline use it
After this, we can update the buildbot and then land http://codereview.chromium.org/586006/show to remove the old version. Review URL: http://codereview.chromium.org/591001
This commit is contained in:
parent
8a4af3a999
commit
fdda89f49f
41
enable_localaccount.sh
Executable file
41
enable_localaccount.sh
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z $1 ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 localaccount_username"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Enabling local account $1@gmail.com."
|
||||||
|
echo "Remove ../platform/pam_google/pam_localaccount.h and "
|
||||||
|
echo "../platform/pam_offline/pam_localaccount.h to disable."
|
||||||
|
|
||||||
|
cat <<EOF > ../platform/pam_google/pam_localaccount.h
|
||||||
|
// local username for Chrome OS pam
|
||||||
|
// This file is auto-generated by enable_localaccount.sh
|
||||||
|
|
||||||
|
#ifndef CHROMEOS_PAM_LOCALACCOUNT_H_
|
||||||
|
#define CHROMEOS_PAM_LOCALACCOUNT_H_
|
||||||
|
|
||||||
|
namespace chromeos_pam {
|
||||||
|
const char kLocalAccount[] = "$1@gmail.com";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CHROMEOS_PAM_LOCALACCOUNT_H_
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat <<EOF > ../platform/pam_offline/pam_localaccount.h
|
||||||
|
// local username for Chrome OS pam
|
||||||
|
// This file is auto-generated by enable_localaccount.sh
|
||||||
|
|
||||||
|
#ifndef CHROMEOS_PAM_LOCALACCOUNT_H_
|
||||||
|
#define CHROMEOS_PAM_LOCALACCOUNT_H_
|
||||||
|
|
||||||
|
namespace pam_offline {
|
||||||
|
const char kLocalAccount[] = "$1@gmail.com";
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // CHROMEOS_PAM_LOCALACCOUNT_H_
|
||||||
|
EOF
|
Loading…
x
Reference in New Issue
Block a user