diff options
Diffstat (limited to 'scripts/migrate-pax')
-rwxr-xr-x | scripts/migrate-pax | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/migrate-pax b/scripts/migrate-pax index 1d5c2f7..09a41e2 100755 --- a/scripts/migrate-pax +++ b/scripts/migrate-pax @@ -55,6 +55,12 @@ def run_usage(): def main(): + # Are we root? + uid = os.getuid() + if uid != 0: + print('This program must be run as root') + sys.exit(1) + try: opts, args = getopt.getopt(sys.argv[1:], 'vmdh') except getopt.GetoptError as err: @@ -95,12 +101,6 @@ def main(): run_usage() sys.exit(1) - # Are we root? - uid = os.getuid() - if uid != 0 and do_migration: - print('RUN AS ROOT: cannot migrate flags') - sys.exit(1) - # Do we have XATTR_PAX support? if do_migration or do_deleteall: try: |